Moving Splitter Control (VB)

Algar

Active member
Joined
Jun 17, 2003
Messages
28
Location
Toronto
I am trying to move a splitter control at runtime to maintain a minimum Splitter.Top position during splitter movement and form resizing.

I put the following code in a sub

If split.Top < 685 Then split.Location = New System.Drawing.Point(0, 685)

And im calling this sub from the form_resize, split_splittermoving and split_splittermoved events.

When I go to move the splitter and split.Top becomes less then 685 is starts flashing beween where my mouse is currently dragging it, and the 685 position (during the _splittermoving event) but when I release the mouse it stays in its position above the 685.

Also resizing the form after the splitter has been released at a position higher then 685 does not reposition it.

Thanks in advance for any help provided.
 
MinSize is the control size I beleive but as I went to look I noticed the MinExtra property which is the size of the undocked area, exactly what I want.

All these new properties in .net uuhhhh :)

Thanks !
 
Back
Top