ReplacePoint — Pseudo widget to replace parts of a dialog
ReplacePoint
( | term | child
); |
A ReplacePoint can be used to dynamically change parts of a dialog. It contains one widget. This widget can be replaced by another widget by calling ReplaceWidget( `id( id ), newchild ), where id is the the id of the new child widget of the replace point. The ReplacePoint widget itself has no further effect and no optical representation.
{
UI::OpenDialog(
`VBox(
`ReplacePoint(`id(`rp), `Label("This is a label")),
`PushButton(`id(`change), "Change")));
UI::UserInput();
UI::ReplaceWidget(`id(`rp), `PushButton("This is a PushButton"));
UI::UserInput();
UI::ReplaceWidget(`id(`rp), `CheckBox("This is a CheckBox"));
UI::UserInput();
UI::ReplaceWidget(`id(`rp), `HBox(`PushButton("Button1"), `PushButton("Button2")));
UI::UserInput();
UI::CloseDialog();
}