Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 5 - Control Manager / Introduction to Controls


Radio Buttons

Like checkboxes, radio buttons retain and display an on-or-off setting. You organize radio buttons in a group to offer a choice among several alternatives--typically, inside a dialog box. Radio buttons are small circles; when the user clicks a radio button to turn it on, use the Control Manager procedure SetControlValue to fill the radio button with a small black dot. The user can have only one radio button setting in effect at one time. In other words, radio buttons are mutually exclusive. However, the Control Manager cannot determine how your radio buttons are grouped; therefore, when the user turns on one radio button, it is up to your application to use SetControlValue to turn off the others in that group.

A set of radio buttons normally has two to seven items; each set must always have at least two radio buttons. Each set of radio buttons must have a label that identifies the kind of choices the group offers. Also, each button must have a title that identifies what the radio button does. This title can be a few words or a phrase. A set of radio buttons is never dynamic--that is, its contents should never change according to the context. (If you need to display more than seven items, or if the items change as the context changes, you should use a pop-up menu instead.)

Radio buttons represent choices that are related but not necessarily opposite. For example, a pair of radio buttons may provide a choice between using the modem port or the printer port, as shown in Figure 5-1 on page 5-4. If more than one set of radio buttons is visible at one time, you need to demarcate the sets from one another. For example, you can draw a dotted line around a set of radio buttons to separate it from other elements in a dialog box.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996