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.
- C#
- VB.NET
public class VisSplitter : SalCustomControl, IMessageFilter
Public Class VisSplitter
Inherits SalCustomControl
Implements 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
VisSplitter()
Initializes a nonselectable splitter and its designer components.
Properties
Anchor
AnchorStyles: Gets the anchoring selected by the orientation. (Default: Top, Left)
Assignments are ignored; Orientation selects the anchoring.
CreateParams
CreateParams: Gets native creation parameters without automatic border styles.
The control paints its own border.
Cursor
Cursor: Gets the cursor appropriate for the divider orientation.
Assignments are ignored.
Dock
DockStyle: Gets the fixed docking mode. (Default: None)
Assignments are ignored.
HScroll
Boolean: Gets whether horizontal scrolling is enabled. (Default: False)
Assignments are ignored.
Orientation
Orientation: Gets or sets the divider orientation. (Default: Vertical)
Restores the saved position, updates anchoring, and resizes associated controls.
SplitterThickness
Int32: Gets or sets the divider thickness. (Default: 6)
Updates Height for a horizontal divider or Width for a vertical divider.
VScroll
Boolean: Gets whether vertical scrolling is enabled. (Default: False)
Assignments are ignored.
WindowsClassName
String: Gets the native custom-class override. (Default: "")
Assignments are ignored.
WindowsDLLName
String: Gets the native custom-library override. (Default: "")
Assignments are ignored.
WindowsExStyle
Int32: Gets additional extended native style flags. (Default: 0)
Assignments are ignored.
WindowsStyle
Int32: Gets additional native window-style flags. (Default: 0)
Assignments are ignored.
Methods
FromHandle(handle)
Resolves a splitter from a native window handle.
| Parameter | Type | Description |
|---|---|---|
| handle | SalWindowHandle | The native control handle. |
Returns: VisSplitter. The associated VisSplitter, or null when no managed control owns the handle.
A different managed control type causes InvalidCastException.
GetOrientation()
Reads the divider direction as a Visual Toolchest constant.
Returns: SalNumber. ORIENT_SPLIT_Vertical for vertical orientation; otherwise ORIENT_SPLIT_Horizontal.
OnHandleCreated(e)
Raises the base event and subscribes to designer load completion in design mode.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnHandleDestroyed(e)
Raises the base event and removes the designer load-completion subscription.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnMouseDown(e)
Raises the base event and starts dragging on a single left-button press.
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The event data. |
OnMouseMove(e)
Raises the base event and updates an active divider drag.
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The event data. |
OnMouseUp(e)
Raises the base event and accepts an active divider drag.
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The event data. |
OnPaint(e)
Raises the base paint event and draws the divider border on the appropriate sides.
| Parameter | Type | Description |
|---|---|---|
| e | PaintEventArgs | The event data. |
OnSizeChanged(e)
Raises the base size event and refreshes the divider.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
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.
SetBoundsCore(x, y, width, height, specified)
Constrains the divider to span its parent and applies the configured thickness.
| Parameter | Type | Description |
|---|---|---|
| x | Int32 | The requested horizontal position in pixels. |
| y | Int32 | The requested vertical position in pixels. |
| width | Int32 | The requested width in pixels. |
| height | Int32 | The requested height in pixels. |
| specified | BoundsSpecified | The 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.
SetChild(preceeding, child)
Associates a control with one side of the divider.
| Parameter | Type | Description |
|---|---|---|
| preceeding | SalBoolean | True for the left or top side; false for the right or bottom side. |
| child | Control | The 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
| Name | Description |
|---|---|
| ISalWindow |