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.
- C#
- VB.NET
public class XSalSplitter : SalCustomControl, IMessageFilter
Public Class XSalSplitter
Inherits SalCustomControl
Implements 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
BarSize
Int32: Gets or sets the splitter bar thickness in pixels and updates the bound-control layout. (Default: 4)
BorderStyle
BorderStyle: Gets or sets the pane border appearance and recalculates the available pane bounds. (Default: Fixed3D)
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.
HScroll
Boolean: Gets false; horizontal scrollbar assignments are ignored. (Default: False)
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)
MinExtra
Int32: Gets or sets the minimum space reserved for the bottom or right pane in pixels. (Default: 0)
MinSize
Int32: Gets or sets the minimum top or left pane size in pixels. (Default: 0)
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.
Proportional
Boolean: Gets or sets whether Position represents thousandths of the available width or height instead of pixels. (Default: True)
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.
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.
VScroll
Boolean: Gets false; vertical scrollbar assignments are ignored. (Default: False)
WindowsClassName
String: Gets an empty string; assigning a native class name has no effect on this managed splitter. (Default: "")
WindowsDLLName
String: Gets an empty string; assigning a native library name has no effect on this managed splitter. (Default: "")
WindowsExStyle
Int32: Gets zero; assigning extended native style flags has no effect on this managed splitter. (Default: 0)
WindowsStyle
Int32: Gets zero; assigning native style flags has no effect on this managed splitter. (Default: 0)
Methods
FromHandle(handle)
Resolves a native window handle to a splitter instance.
| Parameter | Type | Description |
|---|---|---|
| handle | SalWindowHandle | The splitter window handle. |
Returns: XSalSplitter. The associated splitter, or null if no managed control is associated.
Throws:
- InvalidCastException The handle belongs to another managed control type.
GetBarPosition()
Gets the current position in the active positioning mode.
Returns: SalNumber. The proportional thousandths value or absolute pixel position.
GetStyle()
Gets the active splitter behavior flags.
Returns: SplitterStyles. The combined splitter style flags.
OnFontChanged(e)
Resizes the pane caption labels to the new font height and updates layout.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnHandleCreated(e)
Initializes the split position and arranges bound controls after native handle creation.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnMouseDown(e)
Begins dragging after a single left-button press on a resizable splitter bar.
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The mouse position, button, and click count. |
OnMouseLeave(e)
Restores the default cursor when the pointer leaves the splitter.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnMouseMove(e)
Moves an active drag marker or selects the appropriate resize cursor over the bar.
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The mouse event data. |
OnMouseUp(e)
Commits an active splitter drag after base mouse-up processing.
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The mouse event data. |
OnMove(e)
Repositions the bound controls when the splitter moves.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnPaint(e)
Draws the splitter and pane borders after base painting.
| Parameter | Type | Description |
|---|---|---|
| e | PaintEventArgs | The drawing surface and clip bounds. |
OnPaintBackground(e)
Draws the splitter background and pane borders.
| Parameter | Type | Description |
|---|---|---|
| e | PaintEventArgs | The drawing surface and clip bounds. |
OnResize(e)
Reapplies the proportional split or refreshes absolute layout after resizing.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnTextChanged(e)
Splits the caption into two pane labels, hides empty labels, and updates layout.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
SetBarPosition(pos)
Assigns the splitter position using the active positioning mode.
| Parameter | Type | Description |
|---|---|---|
| pos | SalNumber | Thousandths of the relevant dimension in proportional mode, or pixels in absolute mode. |
Returns: SalBoolean. Always true after assignment.
SetBarSize(size)
Assigns the splitter bar thickness.
| Parameter | Type | Description |
|---|---|---|
| size | SalNumber | The thickness in pixels. |
Returns: SalBoolean. Always true after assignment.
SetMinMaxPosition(min, max)
Assigns the minimum space reserved on each side of the splitter.
| Parameter | Type | Description |
|---|---|---|
| min | SalNumber | The minimum top or left pane size in pixels. |
| max | SalNumber | The minimum bottom or right pane size in pixels; this is not an absolute maximum coordinate. |
Returns: SalBoolean. Always true after assignment.
SetStyle(style, on)
Enables or clears splitter behavior flags and updates layout when the flags change.
| Parameter | Type | Description |
|---|---|---|
| style | SplitterStyles | The flags to modify. |
| on | SalBoolean | True to enable the flags; false to clear them. |
Returns: SalBoolean. Always true.
Inherited By
| Name | Description |
|---|---|
| XSalHSplitter | Provides a horizontal splitter with controls in its top and bottom panes. |
| XSalVSplitter | Provides a vertical splitter with controls in its left and right panes. |
Implements
| Name | Description |
|---|---|
| ISalWindow |