The block normally contains only other dialog objects, but it is also possible to use other User Language statements, for example to conditionally add objects to the dialog (see the second example below).
By default a dlgDialog contains a dlgVBoxLayout, so a simple dialog doesn't have to worry about the layout.
A dlgDialog should at some point contain a call to the dlgAccept() function in order to allow the user to close the dialog and accept its contents.
If all you need is a simple message box or file dialog you might want to use one of the Predefined Dialogs instead.
Examples
int Result = dlgDialog("Hello") { dlgLabel("Hello world"); dlgPushButton("+OK") dlgAccept(); }; int haveButton = 1; dlgDialog("Test") { dlgLabel("Start"); if (haveButton) dlgPushButton("Here") dlgAccept(); };
Index | Copyright © 2005 CadSoft Computer GmbH |