1. Divide the WinForm into three columns
The entire form is divided into three columns that can be automatically adjusted:
1. Drop two panel controls on a form
which
panelleft--set the Dock property to "left" and adjust its width.
panelright--set the Dock property to "right" and adjust its width
2. Throw a splitter on the form the control is named Splitterleft so that it is close to the Panelleft, setting its Dock property to "left"
3. Throw a splitter on the form the control is named Splitterright so that it is close to the panelright, setting its Dock property to "right"
4. Throw a Panel control to the form named Panelcenter, set its Dock property to "center"
Run to achieve the desired effect (note: The splitter control can only be used as a child control of the controls property of a form, not as a child of a Panel control)
The MinSize and Minextra properties restrict the distance that the separator bar can be moved. The difference is that the MinSize property specifies the minimum distance (in pixels) between the separator bar and the container boundary where the separator bar is located. The Minextra property specifies the distance (in pixels) between the edge of the container and the divider bar.
2. Divide the WinForm into two columns
Create a new form and add the controls in the following order.
1, put in a panel such as: Panel1 and then set his Dock property is: left;
2, put in a splitter such as: Splitter1 set its background color for a special color, easy to see the effect of execution;
3, put in a panel such as: Panel2 and then set his Dock property is: Fill;
4, compile the execution program, this time there is no problem.