If Text contains an '&', the character following the ampersand will become a hotkey, and when the user hits Alt+hotkey, the button will be selected. To have an actual '&' character in the text it has to be escaped.
dlgRadioButton can only be used within a dlgGroup.
All radio buttons within the same group must use the same Selected variable!
If the user selects a dlgRadioButton, the index of that button within the dlgGroup
is stored in the Selected variable.
The initial value of Selected defines which radio button is initially selected.
If Selected is outside the valid range for this group, no radio button will be selected.
In order to get the correct radio button selection, Selected must be set before
the first dlgRadioButton is defined, and must not be modified between adding subsequent
radio buttons. Otherwise it is undefined which (if any) radio button will be selected.
The optional statement is executed every time the dlgRadioButton is selected.
Example
int align = 1; dlgGroup("Alignment") { dlgRadioButton("&Top", align); dlgRadioButton("&Center", align); dlgRadioButton("&Bottom", align); }
Index | Copyright © 2005 CadSoft Computer GmbH |