HSquash, VSquash, HVSquash — Layout aid: Minimize widget to its nice size
HSquash
( | term | child
) ; |
VSquash
( | term | child
) ; |
HVSquash
( | term | child
) ; |
The Squash widgets are used to control the layout. A HSquash
widget makes its child widget nonstretchable in the horizontal dimension. A VSquash
operates vertically, a HVSquash
in both dimensions.
You can used this for example to reverse the effect of `Left
making a widget stretchable. If you want to make a VBox containing for left aligned CheckBoxes, but want the VBox itself to be nonstretchable and centered, than you enclose each CheckBox with a `Left( .. )
and the whole VBox with a HSquash( ... )
.
{ UI::OpenDialog(`opt(`defaultsize), `VBox( `VCenter( // Makes the HSquash stretchable vertically `HSquash( // Makes the VBox nonstretchable horizontally `VBox( `Left(`CheckBox("short")), `Left(`CheckBox("longer")), `Left(`CheckBox("even longer")), `Left(`CheckBox("yet even longer"))))), `Left(`PushButton("bottom left")) ) ); UI::UserInput(); UI::CloseDialog(); }