Skip to main content

VisSplitter

Namespace: PPJ.Runtime.Vis

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

Resizes two associated sibling controls around a draggable horizontal or vertical divider.

public class VisSplitter : SalCustomControl, IMessageFilter

Example:

void Attach(PPJ.Runtime.Vis.VisSplitter splitter, System.Windows.Forms.Control left, System.Windows.Forms.Control right)
{
splitter.Orientation = PPJ.Runtime.Vis.Orientation.Vertical;
splitter.SetChild(true, left);
splitter.SetChild(false, right);
splitter.ResizeObjects();
}

Constructors

Instance member VisSplitter()

Initializes a nonselectable splitter and its designer components.

Properties

Instance member Anchor

AnchorStyles: Gets the anchoring selected by the orientation. (Default: Top, Left)

Assignments are ignored; Orientation selects the anchoring.

Protected member CreateParams

CreateParams: Gets native creation parameters without automatic border styles.

The control paints its own border.

Instance member Cursor

Cursor: Gets the cursor appropriate for the divider orientation.

Assignments are ignored.

Instance member Dock

DockStyle: Gets the fixed docking mode. (Default: None)

Assignments are ignored.

Instance member HScroll

Boolean: Gets whether horizontal scrolling is enabled. (Default: False)

Assignments are ignored.

Instance member Orientation

Orientation: Gets or sets the divider orientation. (Default: Vertical)

Restores the saved position, updates anchoring, and resizes associated controls.

Instance member SplitterThickness

Int32: Gets or sets the divider thickness. (Default: 6)

Updates Height for a horizontal divider or Width for a vertical divider.

Instance member VScroll

Boolean: Gets whether vertical scrolling is enabled. (Default: False)

Assignments are ignored.

Instance member WindowsClassName

String: Gets the native custom-class override. (Default: "")

Assignments are ignored.

Instance member WindowsDLLName

String: Gets the native custom-library override. (Default: "")

Assignments are ignored.

Instance member WindowsExStyle

Int32: Gets additional extended native style flags. (Default: 0)

Assignments are ignored.

Instance member WindowsStyle

Int32: Gets additional native window-style flags. (Default: 0)

Assignments are ignored.

Methods

Static member FromHandle(handle)

Resolves a splitter from a native window handle.

ParameterTypeDescription
handleSalWindowHandleThe native control handle.

Returns: VisSplitter. The associated VisSplitter, or null when no managed control owns the handle.

A different managed control type causes InvalidCastException.

Instance member GetOrientation()

Reads the divider direction as a Visual Toolchest constant.

Returns: SalNumber. ORIENT_SPLIT_Vertical for vertical orientation; otherwise ORIENT_SPLIT_Horizontal.

Protected member OnHandleCreated(e)

Raises the base event and subscribes to designer load completion in design mode.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnHandleDestroyed(e)

Raises the base event and removes the designer load-completion subscription.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnMouseDown(e)

Raises the base event and starts dragging on a single left-button press.

ParameterTypeDescription
eMouseEventArgsThe event data.

Protected member OnMouseMove(e)

Raises the base event and updates an active divider drag.

ParameterTypeDescription
eMouseEventArgsThe event data.

Protected member OnMouseUp(e)

Raises the base event and accepts an active divider drag.

ParameterTypeDescription
eMouseEventArgsThe event data.

Protected member OnPaint(e)

Raises the base paint event and draws the divider border on the appropriate sides.

ParameterTypeDescription
ePaintEventArgsThe event data.

Protected member OnSizeChanged(e)

Raises the base size event and refreshes the divider.

ParameterTypeDescription
eEventArgsThe event data.

Instance member ResizeObjects()

Resizes associated controls to the areas on either side of the divider.

Returns: SalNumber. Zero.

Layout is suspended on the parent during the update. No bounds are changed when the splitter has no parent.

Protected member SetBoundsCore(x, y, width, height, specified)

Constrains the divider to span its parent and applies the configured thickness.

ParameterTypeDescription
xInt32The requested horizontal position in pixels.
yInt32The requested vertical position in pixels.
widthInt32The requested width in pixels.
heightInt32The requested height in pixels.
specifiedBoundsSpecifiedThe bounds components requested by the caller.

A location-only request saves its position for later orientation changes. Associated controls are resized after the bounds update.

Instance member SetChild(preceeding, child)

Associates a control with one side of the divider.

ParameterTypeDescription
preceedingSalBooleanTrue for the left or top side; false for the right or bottom side.
childControlThe associated control, or null to detach that side.

Returns: Control. The previously associated control for that side.

A non-null child has its border removed and is made visible. This method does not reparent it.

Implements

NameDescription
ISalWindow