| superclass(es) | control |
| subclass(es) | - |
| description | The radiobutton control is a control which the user can select or
unselect. Usually a set of radiobuttons is used together to have the user select one of
the exclusive choices. |
| see also | panel - checkBox |
Radiobuttons are controls that work in groups. In a group of radiobuttons only a single radiobutton can be checked. To create a radiobutton that is the first in a new group use the method createStartGroup/7, the remaining radiobuttons of the group can then be created by using the method create/7. To start a new separate group of radiobuttons use the createStartGroup/7 method again. The example below creates two groups of radiobuttons:
|
create(Parent, Checked, X, Y, Width, Height, Output)
| func | Create a radiobutton control at a specified position with the specified dimensions. Because a control is a child window a parent window must always be specified. If the variable Checked contains true the radiobutton is initially checked, else not. The coordinates X, Y, Width and Height determine the dimensions, in window coordinates, of the control. |
| pre | The variable Parent must refer to a parent window. The Checked variable must contain true or false, the X, Y, Width and Height coordinates must specify a position and dimension for the control. |
| post | If the control was successfully created then true was assigned to Output, else was false assigned. |
createStartGroup(Parent, Checked, X, Y, Width, Height, Output)
| func | Create a radiobutton control that is also the start of a group of radiobuttons, at a specified position with the specified dimensions. Because a radiobutton is a child window a parent window must always be specified. If the variable Checked contains true the radiobutton is initially checked, else not. The coordinates X, Y, Width and Height determine the dimensions, in window coordinates, of the control. |
| pre | The variable Parent must refer to a parent window. The Checked variable must contain true or false, the X, Y, Width and Height coordinates must contains integer values and specify a position and dimension for the control. |
| post | If the control was successfully created then true was assigned to Output, else it was assigned false. |
| func | Add or remove the checkmark of the radiobutton control. |
| pre | The variable YesNo must contain the boolean value true or false. |
| post | If YesNo was true the radiobutton is checked, else the check is removed. |
| func | Determine if the radiobutton is checked or not. |
| pre | TRUE. |
| post | If YesNo contains true the radiobutton is checked, else Output contains false. |