| superclass(es) | control |
| subclass(es) | - |
| description | The checkbox control is a simple control which the user can select or
unselect. It is also possible that a checkbox can be in a third state but this is only
possible if the checkbox was created using the method createThreeState/7. |
| see also | panel - radioButton |
A two state checkbox is created by the method create/7 and a three state checkbox is created by the method createThreeState/7. A normal checkbox has two states;
checked or unchecked, a three-state checkbox adds to these states the grayed state (also
called the undeterminate state). The methods putGray/1 and grayed/1 only work if the checbox is a threestate checkbox. |
create(Parent, Checked, X, Y, Width, Height, Output)
| func | Create a checkbox 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 checkbox 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 is assigned to Output, else it will contain false. |
createThreeState(Parent, State, X, Y, Width, Height, Output)
| func | Create a checkbox control that can have three states, at a specified position with the specified dimensions. Because a button is a child window a parent window must always be specified. The variable State must contain one of the following three atoms: 'checked', 'unchecked' or 'grayed'. 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 State variable must 'unchecked', 'checked' or 'grayed', the X, Y, Width and Height coordinates must specify a position and dimensions for the control. |
| post | If the control was successfully created then true is assigned to Output, else it will contain false. |
| func | Add or remove the checkmark of the checkbox control. |
| pre | The variable YesNo must contain true or false. |
| post | If YesNo contains true the checkbox now displays a checkmark, else it does not display a checkmark. |
| func | Determine if the checkbox is checked or not. |
| pre | TRUE. |
| post | If YesNo contains true the checkbox is checked, else Output contains false. |
| func | Determine if the checkbox is a three state checkbox. |
| pre | TRUE. |
| post | If YesNo contains true the checkbox is a three state checkbox, else Output contains false. |
| func | Put a three state checkbox into the grayed state. |
| pre | TRUE. |
| post | The checkbox displays a grayed checkmark. |
| func | Determine if the checkbox is in the grayed state. |
| pre | TRUE. |
| post | If YesNo contains true the checkbox is grayed, else Output contains false. |