How to move a splitter

F

Frank

On a form I have a control that is docked top.
Under it a splitterbar that is also docked top.

If I want to programmatically move the splitter how do I do that:
Set the height of the control or the top of the splitter?

I have various instances of similar scenarios and cut-and-try sometime I can
get it to work and sometimes I can not.

What is the correct way?


Thanks
 
A

Armin Zingler

Frank said:
On a form I have a control that is docked top.
Under it a splitterbar that is also docked top.

If I want to programmatically move the splitter how do I do that:
Set the height of the control or the top of the splitter?

I have various instances of similar scenarios and cut-and-try
sometime I can get it to work and sometimes I can not.

What is the correct way?

I'd set the Splitter's Splitposition property.


Armin
 
F

Frank

works great.

I saw this after I tried SplitPosition.



Gets or sets the distance between the splitter control and the container
edge that the control is docked to. Splitter.SplitPosition has been replaced
by SplitContainer.Panel1MinSize and SplitContainer.Panel2MinSize and is
provided only for compatibility with previous versions.



The text for Panel1MinSize does not sound like a replacement for
SplitPosition!

What do you think.



Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top