{<name>:} sash
Sash sub-panel. This is a separator which can be interactively repositioned in one direction.
Panel window
Tab window
<name>
A name to be given to the sub-panel for reference purposes.
-h=<num>
The height of the sash in pixels. Using this switch indicates that the sash is vertical.
-link=<text>
The resize linkage for the panel. This ties panel edges to one or more edges of the parent
window, with the result that when the parent window gets resized, the
panel gets automatically resized as well. <text>
is a combination of the characters L, R, T, B and M. A value of "LRTB"
means that the left, right, top and bottom edges of a sub-panel are linked
to its parent. The default value is "TL", which links the left
and top edges to the parent window but does no resizing because its right
and bottom edges are not linked. Note that the linkage is to edges of
the parent window, not to column/row extremities. More complicated linkage
requirements should be done via the window.resize
callback on the parent window.
-w=<num>
The width of the sash in pixels. Using this switch indicates that the
sash is horizontal.
When neither the -h nor -w switches are present, the orientation of the sash is determined by the parent row/column orientation, and the dimension of the sash is assumed to be the width/height of the parent row/column.
Called when the user clicks on the sash. By holding down the mouse the sash can be repositioned by dragging it in one direction. At the end of the drag operation the callback will be invoked, passing the window, panel and reposition increment. The callback can then reposition other panels in the window accordingly, i.e.
panel.exec(<window>,<panel>,<num>)
panel.exec { args w=window, p=panel, diff=numeric }
The callback is only invoked automatically by interactively moving the sash. Any programmatic redefinition of the sash geometry will not invoke the callback.
Create a panel window containing two graphic subwindows separated by a horizontal sash.
window w = wpanel { g1: wgraphic -dim=<500,300> s: sash ;# column mode, orientation is horizontal g2: wgraphic -dim=<500,300> } w.s.exec = { args w=window, p=panel, diff=numeric w.g1.rect[4] += diff w.g2.rect[2] += diff # Note: Code should be inserted where necessary to # cater for values which might make the other # panels unusable (e.g. their height might now be 0) # In such cases, the following should be used to # reinstate the sash to its original position. p.position[2] -= diff }