Skip to main content

XSalSplitter

Namespace: PPJ.Runtime.XSal

Assembly: PPJ.Runtime.XSal.50 (5.0.0.0)

Arranges two bound controls around a draggable bar with optional captions and proportional sizing.

public class XSalSplitter : SalCustomControl, IMessageFilter

Use XSalHSplitter or XSalVSplitter to choose the orientation. Bound controls retain their existing parent.

Example:

var splitter = new PPJ.Runtime.XSal.XSalVSplitter();
splitter.Proportional = true;
splitter.Position = 500;
splitter.Text = "Navigation;Details";

Properties​

Instance member BarSize​

Int32: Gets or sets the splitter bar thickness in pixels and updates the bound-control layout. (Default: 4)

Instance member BorderStyle​

BorderStyle: Gets or sets the pane border appearance and recalculates the available pane bounds. (Default: Fixed3D)

Instance member FirstControl​

Control: Gets or sets the control arranged in the top or left pane.

Assignment clears docking and updates bounds for a control with a parent and native handle.

Instance member HScroll​

Boolean: Gets false; horizontal scrollbar assignments are ignored. (Default: False)

Instance member InvertDocking​

Boolean: Gets or sets whether absolute layout preserves the bottom or right pane size instead of the top or left pane size. (Default: False)

Instance member MinExtra​

Int32: Gets or sets the minimum space reserved for the bottom or right pane in pixels. (Default: 0)

Instance member MinSize​

Int32: Gets or sets the minimum top or left pane size in pixels. (Default: 0)

Instance member Position​

Int32: Gets or sets the splitter position in thousandths when proportional, or in pixels when absolute.

A proportional value of 500 places the split halfway across the relevant dimension.

Instance member Proportional​

Boolean: Gets or sets whether Position represents thousandths of the available width or height instead of pixels. (Default: True)

Instance member SecondControl​

Control: Gets or sets the control arranged in the bottom or right pane.

Assignment clears docking and updates bounds for a control with a parent and native handle.

Instance member Text​

String: Gets or sets the two pane captions, separated by a semicolon. (Default: "")

Empty caption components hide their labels; components after the second are ignored.

Instance member VScroll​

Boolean: Gets false; vertical scrollbar assignments are ignored. (Default: False)

Instance member WindowsClassName​

String: Gets an empty string; assigning a native class name has no effect on this managed splitter. (Default: "")

Instance member WindowsDLLName​

String: Gets an empty string; assigning a native library name has no effect on this managed splitter. (Default: "")

Instance member WindowsExStyle​

Int32: Gets zero; assigning extended native style flags has no effect on this managed splitter. (Default: 0)

Instance member WindowsStyle​

Int32: Gets zero; assigning native style flags has no effect on this managed splitter. (Default: 0)

Methods​

Static member FromHandle(handle)​

Resolves a native window handle to a splitter instance.

ParameterTypeDescription
handleSalWindowHandleThe splitter window handle.

Returns: XSalSplitter. The associated splitter, or null if no managed control is associated.

Throws:

Instance member GetBarPosition()​

Gets the current position in the active positioning mode.

Returns: SalNumber. The proportional thousandths value or absolute pixel position.

Instance member GetStyle()​

Gets the active splitter behavior flags.

Returns: SplitterStyles. The combined splitter style flags.

Protected member OnFontChanged(e)​

Resizes the pane caption labels to the new font height and updates layout.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnHandleCreated(e)​

Initializes the split position and arranges bound controls after native handle creation.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnMouseDown(e)​

Begins dragging after a single left-button press on a resizable splitter bar.

ParameterTypeDescription
eMouseEventArgsThe mouse position, button, and click count.

Protected member OnMouseLeave(e)​

Restores the default cursor when the pointer leaves the splitter.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnMouseMove(e)​

Moves an active drag marker or selects the appropriate resize cursor over the bar.

ParameterTypeDescription
eMouseEventArgsThe mouse event data.

Protected member OnMouseUp(e)​

Commits an active splitter drag after base mouse-up processing.

ParameterTypeDescription
eMouseEventArgsThe mouse event data.

Protected member OnMove(e)​

Repositions the bound controls when the splitter moves.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnPaint(e)​

Draws the splitter and pane borders after base painting.

ParameterTypeDescription
ePaintEventArgsThe drawing surface and clip bounds.

Protected member OnPaintBackground(e)​

Draws the splitter background and pane borders.

ParameterTypeDescription
ePaintEventArgsThe drawing surface and clip bounds.

Protected member OnResize(e)​

Reapplies the proportional split or refreshes absolute layout after resizing.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnTextChanged(e)​

Splits the caption into two pane labels, hides empty labels, and updates layout.

ParameterTypeDescription
eEventArgsThe event data.

Instance member SetBarPosition(pos)​

Assigns the splitter position using the active positioning mode.

ParameterTypeDescription
posSalNumberThousandths of the relevant dimension in proportional mode, or pixels in absolute mode.

Returns: SalBoolean. Always true after assignment.

Instance member SetBarSize(size)​

Assigns the splitter bar thickness.

ParameterTypeDescription
sizeSalNumberThe thickness in pixels.

Returns: SalBoolean. Always true after assignment.

Instance member SetMinMaxPosition(min, max)​

Assigns the minimum space reserved on each side of the splitter.

ParameterTypeDescription
minSalNumberThe minimum top or left pane size in pixels.
maxSalNumberThe minimum bottom or right pane size in pixels; this is not an absolute maximum coordinate.

Returns: SalBoolean. Always true after assignment.

Instance member SetStyle(style, on)​

Enables or clears splitter behavior flags and updates layout when the flags change.

ParameterTypeDescription
styleSplitterStylesThe flags to modify.
onSalBooleanTrue to enable the flags; false to clear them.

Returns: SalBoolean. Always true.

Inherited By​

NameDescription
XSalHSplitterProvides a horizontal splitter with controls in its top and bottom panes.
XSalVSplitterProvides a vertical splitter with controls in its left and right panes.

Implements​

NameDescription
ISalWindow