This documentation is archived and is not being maintained.

Splitter.SplitPosition Property

Gets or sets the distance between the splitter control and the container edge that the control is docked to.

[Visual Basic]
Public Property SplitPosition As Integer
[C#]
public int SplitPosition {get; set;}
[C++]
public: __property int get_SplitPosition();
public: __property void set_SplitPosition(int);
[JScript]
public function get SplitPosition() : int;
public function set SplitPosition(int);

Property Value

The distance, in pixels, between the Splitter control and the container edge that the control is docked to. If the Splitter control is not bound to a control, the value is -1.

Remarks

For a horizontal Splitter control (a Splitter control docked to the top or bottom of a container), this value is the height of the resizable control. For a vertical Splitter control (a Splitter control docked to the left or right of a container), this value is the width of the resizable control. You can use the SplitPosition property in an event handler for the SplitterMoved or SplitterMoving events to determine the size of the control that the Splitter control is docked to and limit its width to a specified maximum width (or height if a horizontally docked Splitter control).

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Splitter Class | Splitter Members | System.Windows.Forms Namespace | SplitterMoved | SplitterMoving

Show: