How to move a splitter

  • Thread starter Thread starter Frank
  • Start date Start date
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
 
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
 
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
 
Back
Top