473,569 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

save size after using splitter

Sam
Hi,
I have a panel docked to the bottom of my form. This panel can be
expanded vertically by clicking on a button. When the user click on the
button again, the panel is then collapsed. The panel has a horizontal
splitter, which the user can use to resize the panel when it is
expanded. I would like to save the height of the panel when the user
uses the splitter, so that when the panel is expanded via the button,
it size will be automatically set to the one the user had set.
Unfortunately I don't know on which event of the splitter I should
store the new size?

Can you help?
Thx

Nov 21 '05 #1
5 2314
You could use the SplitPosition property of the Splitter class to get the
height of the panel.

-Atul, Sky Software http://www.ssware.com
Shell MegaPack ActiveX & .Net
Drop In Windows Explorer like Shell Browsing GUI controls for your app.

"Sam" <sa************ **@voila.fr> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
Hi,
I have a panel docked to the bottom of my form. This panel can be
expanded vertically by clicking on a button. When the user click on the
button again, the panel is then collapsed. The panel has a horizontal
splitter, which the user can use to resize the panel when it is
expanded. I would like to save the height of the panel when the user
uses the splitter, so that when the panel is expanded via the button,
it size will be automatically set to the one the user had set.
Unfortunately I don't know on which event of the splitter I should
store the new size?

Can you help?
Thx

Nov 21 '05 #2
"Sam" <sa************ **@voila.fr> schrieb
Hi,
I have a panel docked to the bottom of my form. This panel can be
expanded vertically by clicking on a button. When the user click on
the button again, the panel is then collapsed. The panel has a
horizontal splitter, which the user can use to resize the panel when
it is expanded. I would like to save the height of the panel when
the user uses the splitter, so that when the panel is expanded via
the button, it size will be automatically set to the one the user
had set. Unfortunately I don't know on which event of the splitter I
should store the new size?


Have a look @ these groups for language unrelated questions:
microsoft.publi c.dotnet.framew ork.windowsform s[.*]
Armin
Nov 21 '05 #3
"Sam" <sa************ **@voila.fr> schrieb:
I have a panel docked to the bottom of my form. This panel can be
expanded vertically by clicking on a button. When the user click on the
button again, the panel is then collapsed. The panel has a horizontal
splitter, which the user can use to resize the panel when it is
expanded. I would like to save the height of the panel when the user
uses the splitter


Save the value of the splitter control's 'SplitPosition' property and
restore it later. You don't need to store the size of the controls
connected by the splitter.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

<url: http://www.codeproject .com/cs/miscctrl/collapsiblespli tter.asp>

Atara.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #5
Sam,
In addition to the other comments.

A cursory glance at Splitter in VS.NET's Object Browser suggests:

Splitter.SplitP osition - the current position of the splitter.

Splitter.Splitt erMoved - current position of the splitter moved.

Splitter.Splitt erMoving - the current position of the splitter is about to
move.

Checking on-line help confirms the above.

http://msdn.microsoft.com/library/de...itiontopic.asp

http://msdn.microsoft.com/library/de...movedtopic.asp

http://msdn.microsoft.com/library/de...ovingtopic.asp

Hope this helps
Jay

"Sam" <sa************ **@voila.fr> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
| Hi,
| I have a panel docked to the bottom of my form. This panel can be
| expanded vertically by clicking on a button. When the user click on the
| button again, the panel is then collapsed. The panel has a horizontal
| splitter, which the user can use to resize the panel when it is
| expanded. I would like to save the height of the panel when the user
| uses the splitter, so that when the panel is expanded via the button,
| it size will be automatically set to the one the user had set.
| Unfortunately I don't know on which event of the splitter I should
| store the new size?
|
| Can you help?
| Thx
|
Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1118
by: MooMaster | last post by:
This is more of a wxPython centric question, but not seeing reference to this on the wx group I thought I'd try here since many here also use wxPython toolkit. I started learning GUI development with Tkinter, and developed a few screens as part of an application I'm building with it. I've recently been trying to learn wxPython because of it's...
7
3295
by: John | last post by:
Hi, I have a group of controls in a panel on the right-hand side of a splitter and a treeview on the left-hand side. The only configuration that I can find to make the right-hand side resize correctly is: lhsTreeview - Dock = Fill, Anchor = Top,Left splitter - Dock = Right rhsPanel - Dock = Right, Anchor = Top,Left
3
2854
by: Andre Loker | last post by:
Hi! For my current application I'm looking for a four-way-(cross) splitter control (as often seen in 3D-editors). The .NET Splitter-class is (IIRC) only a two-way splitter. Does anyone know such a four-way-splitter control? Regards, Andre Loker
1
22685
by: Krish | last post by:
This is my first try with C# windows gui devlopment, is it correct to say that gui development in C# is windows forms. I would like to create a form with two sections, 2 datagrids, I would like to have a splitter that will allow me to hide the datagrid either the one on top half or the one on the bottom half. I am going thru this, but...
2
2096
by: eric dexter | last post by:
I am trying to steal this code from the wxpython demo but it appears that mb comes from nowhere and I am having errors because of it import wx #--------------------------------------------------------------------------- class MySplitter(wx.SplitterWindow): def __init__(self, parent, ID, log): ...
7
10354
by: newscorrespondent | last post by:
I want to save the state of a splitcontainer when an application ends. I also save the form state. The SplitContainer does not seem to have a well defined place to put intiialization and termination code. I have tried to use my first splitter moved event to set the splitter position but I am getting several splitter moved events before my...
3
3660
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of html is: <a class="searchsavechanges btn btn3d tbbtn" href="javascript:" style="position:static"> <div id="TBsearchsavechanges">Search</div> </a>
1
1763
by: alan75 | last post by:
i want to set the min and max size of listview in one of the panel resizable by a splitter. am i able to size like 90% of the available height or width like in html instead of a fixed value? thanks.
3
4627
by: Boki | last post by:
Hi All, When put in a webbowser box into form, there is no adjustable anchor for user to adjust size if he/she want. I use an external Hscroll for adjustment. The problem is I have two webbrowser box inside same form, I need to change their location in run time.
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.