468,777 Members | 2,307 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,777 developers. It's quick & easy.

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 2129
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*********************@o13g2000cwo.googlegro ups.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.public.dotnet.framework.windowsforms[.*]
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/collapsiblesplitter.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.SplitPosition - the current position of the splitter.

Splitter.SplitterMoved - current position of the splitter moved.

Splitter.SplitterMoving - 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*********************@o13g2000cwo.googlegro ups.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by MooMaster | last post: by
7 posts views Thread by John | last post: by
3 posts views Thread by Andre Loker | last post: by
1 post views Thread by Krish | last post: by
7 posts views Thread by newscorrespondent | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.