Important: The information in this document is obsolete and should not be used for new development.
Checkboxes
Checkboxes provide alternative choices. Typically you use checkboxes in dialog boxes so that users can specify information necessary for completing a command. Checkboxes act like toggle switches, turning a setting either off or on. Use checkboxes to indicate one or more options that must be either off or on. A checkbox appears as a small square with a title alongside it; use the Control Manager procedureSetControlValue
to place an X in the box when the user selects it by clicking it on and to remove the X when the user deselects it by clicking it off. Figure 5-3 shows a selected checkbox.Figure 5-3 A selected checkbox
When you design a dialog box, you can include any number of checkboxes--including only one. Checkboxes are independent of each other, even when they offer related options. Within a dialog box, it's a good idea to group sets of related checkboxes and to provide some visual demarcation between different groups.
Each checkbox has a title. It can be very difficult to title the option in an unambiguous way. The title should reflect two clearly opposite states. For example, in a Finder's Info window, a checkbox provides the option to lock a file. The checkbox is titled simply Locked. The clearly opposite state, when the option is off, is unlocked.
If you can't devise a checkbox title that clearly implies an opposite state, you might be better off using two radio buttons. With two radio buttons, you can use two titles, thereby clarifying the states.
Checkboxes are frequently used in dialog boxes to set or modify future actions instead of specifying actions to be taken immediately. See the chapter "Dialog Manager" in this book for a detailed discussion of how and where to display checkboxes in dialog boxes.