SplitView

A SplitView is a container component that holds two child components separated by a movable divider. The divider can be dragged to resize the space allocated to each component dynamically.

Extends UIComponent.

Constructor

new SplitView(text})

Creates an instance of SplitView component.

Parameters:
NameTypeDescription
text}string

Optional text property for the component. When adding this component to Tabs this text would be used as a Tab text.

Classes

SplitView

Members

(readonly) panelSizes :Array.<{width:number, height:number}>

Returns an array of current sizes of both child components as an array of objects {width:number, height:number}.

Type:
  • Array.<{width:number, height:number}>

Methods

dividerPosition(positionopt) → {number|SplitView}

Sets of gets the position of the divider (from top or left depends on orientation).

Parameters:
NameTypeAttributesDescription
positionnumber<optional>

Position of the divider.

Returns:

If called without parameters, returns current value; otherwise returns this SplitView component for chaining.

Type: 
number | SplitView

dividerSize(sizeopt) → {number|SplitView}

Sets of gets the thickness of the divider.

Parameters:
NameTypeAttributesDescription
sizenumber<optional>

Thickness of the divider in pixels.

Returns:

If called without parameters, returns current value; otherwise returns this SplitView component for chaining.

Type: 
number | SplitView

orientation(orientationopt) → {number|SplitView}

Sets or gets an orientation of divider.

Parameters:
NameTypeAttributesDescription
orientationOrientation<optional>

One of the value: Orientation.Horizontal, Orientation.Vertical

Returns:

If called without parameters, returns current value; otherwise returns this SplitView component for chaining.

Type: 
number | SplitView