Empty, HStretch, VStretch, HVStretch — Stretchable space for layout
Empty
( | void) ; |
HStretch
( | void) ; |
VStretch
( | void) ; |
HVStretch
( | void) ; |
These four widgets denote an empty place in the dialog. They differ in whether they are stretchable or not. Empty is not stretchable in either direction. It can be used in a `ReplacePoint, when currently no real widget should be displayed. HStretch and VStretch are stretchable horizontally or vertically resp., HVStretch is stretchable in both directions. You can use them to control the layout.
{ UI::OpenDialog( `VBox( `Label("Some text goes here"), `Label("This is some more text, that is quite long, as you can see."), `HBox( `PushButton("&OK"), `HStretch() ) ) ); any ret = UI::UserInput(); UI::CloseDialog(); return ret; } |
{ // Layout example: // // Build a dialog with three equal sized buttons. // // The equal `HWeight()s will make the buttons equal sized. // When resized larger, all buttons will retain their size. // Excess space will go to the HStretch() widgets between the // buttons, i.e. there will be empty space between the buttons. UI::OpenDialog( `HBox( `HWeight(1, `PushButton( `opt(`default), "&OK" ) ), `HStretch(), `HWeight(1, `PushButton( "&Cancel everything" ) ), `HStretch(), `HWeight(1, `PushButton( "&Help" ) ) ) ); UI::UserInput(); UI::CloseDialog(); } |