50 lines
1.3 KiB
Text
50 lines
1.3 KiB
Text
.section Widgets
|
|
.topic widget.splitter
|
|
.title Splitter
|
|
.toc 0 Splitter
|
|
.index Splitter
|
|
.index wgtSplitter
|
|
.index wgtSplitterSetPos
|
|
.index wgtSplitterGetPos
|
|
|
|
.h2 Splitter
|
|
|
|
A two-pane container with a draggable divider. The user drags the splitter bar to resize the two panes. Can be oriented vertically (left/right panes) or horizontally (top/bottom panes). Add exactly two children.
|
|
|
|
Header: widgets/widgetSplitter.h
|
|
|
|
.h3 Creation
|
|
|
|
.code
|
|
WidgetT *sp = wgtSplitter(parent, true); // vertical = left|right
|
|
WidgetT *left = wgtVBox(sp);
|
|
WidgetT *right = wgtVBox(sp);
|
|
.endcode
|
|
|
|
.h3 Macros
|
|
|
|
.table
|
|
Macro Description
|
|
----- -----------
|
|
wgtSplitter(parent, vertical) Create a splitter. vertical=true for left/right panes, false for top/bottom.
|
|
wgtSplitterSetPos(w, pos) Set the divider position in pixels.
|
|
wgtSplitterGetPos(w) Get the current divider position in pixels.
|
|
.endtable
|
|
|
|
.h3 Events
|
|
|
|
.table
|
|
Callback Description
|
|
-------- -----------
|
|
onChange Fires when the divider position changes.
|
|
.endtable
|
|
|
|
.h3 Properties (BASIC Interface)
|
|
|
|
.table
|
|
Property Type Access Description
|
|
-------- ---- ------ -----------
|
|
Position Integer Read/Write Divider position in pixels.
|
|
.endtable
|
|
|
|
.hr
|