Using Check Boxes and Radio Buttons
Check boxes and Radio buttons present the user with an either-or choice. A Radio button is pushed or not, and a Check box is checked or not. You use
DLGGET or DLGGETLOG
to check the state of these controls. Their state is a logical value that is .TRUE. if they are pushed or checked, and .FALSE. if they are not. For example:LOGICAL pushed_state, checked_state, retlog retlog = DLGGET (dlg, IDC_RADIOBUTTON1, pushed_state) retlog = DLGGET (dlg, IDC_CHECKBOX1, checked_state)
If you need to change the state of the button, for initialization or in response to other user input, you use
DLGSET or DLGSETLOG
. For example:LOGICAL retlog retlog = DLGSET (dlg, IDC_RADIOBUTTON1, .TRUE.) retlog = DLGSET (dlg, IDC_CHECKBOX1, .TRUE.)
Radio buttons are typically used in a group where the user can select only one of a set of options. When using Radio buttons with the Dialog routines, use the following guidelines: