splitter control allows the user to resize THE DOCKED CONTROL that is
IMMEDIATELY BEFORE IT.
Therefore, to enable the user to resize a docked control at run
time:
1. Dock the control to be resized to an edge of a container.
2. Dock a splitter control to the same side of that container.
e.g: 1 splitter.
control1.Dock = DockStyle.Left
splitter1.Dock = DockStyle.Left
splitter1.MinEx tra = 100
' Set the minimum size control2 can be sized to.
splitter1.MinSi ze = 75
' Set the minimum size control1 can be sized to.
control2.Dock = DockStyle.Fill
' Set control2 to fill the remaining space on the form.
Me.Controls.Add Range(New Control() {control2, splitter1,
control1}) ' Add in reverse order to ensure proper location.
e.g: 2 Splitters.
control1.Dock = System.Windows. Forms.DockStyle .Left
control1.Width = Me.ClientSize.W idth \ 3
control2.Dock = System.Windows. Forms.DockStyle .Top
control2.Height = Me.ClientSize.H eight * 2 \ 3
control3.Dock = System.Windows. Forms.DockStyle .Fill
splitter1.Locat ion = New System.Drawing. Point(121, 0)
splitter1.Width = 3
splitter2.Dock = System.Windows. Forms.DockStyle .Top
splitter2.Heigh t = 3
panel1.Controls .AddRange(New System.Windows. Forms.Control()
{control3, splitter2, control2}) ' Add in reverse order to ensure proper
location
panel1.Dock = System.Windows. Forms.DockStyle .Fill
Me.Controls.Add Range(New System.Windows. Forms.Control() {panel1,
splitter1, control1}) ' Add in reverse order to ensure proper location
Good Luck.
Atara
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!