- Define the size and the position of a radio button and the text to be displayed next to it.
- Start position measured from the left edge of the dialog.
- Start position of measured from the top edge of the dialog.
- Width of the control.
- Text to be displayed next to the radio button.
- Variable to be set to the state of the button. 0 for not selected, 1 for selected.
- Optional default value.
- [<group number>]
- Radio Group number.
- RADIO 70, 44, 70, 24, "Square", type4, 1, 1
To group several radio buttons together, set them all to the same group number and use the same variable name and default value for each of them.
The first radio button in the group will be number 1, the second 2 and so on. Using radio button groups provides a simple way of selecting the
the button to be selected when the dialog is opened and checking which button was selected when the dialog was closed.
- RADIO 70, 120, 70, 24, "Up", DirectionVar, DefaultButton, 3
- RADIO 70, 150, 70, 24, "Down", DirectionVar, DefaultButton, 3
- RADIO 70, 180, 70, 24, "Left", DirectionVar, DefaultButton, 3
- RADIO 70, 210, 70, 24, "Right", DirectionVar, DefaultButton, 3
- This defines a group of 4 radio buttons (group number 3).
- Set the variable "DefaultButton" to the radio button to be selected when the dialog is displayed.
- The variable "DirectionVar" will be set to the button that was selected when the dialog was closed.
- For an example macro see GetCommands.dlg