All Manuals > CAPI User Guide > 3 Creating Common Windows > 3.6 Miscellaneous button elements


3.6.3 Radio buttons

Radio buttons can be created explicitly although they are usually part of a button panel as described in Choices. The :selected keyword is used to specify whether or not the button is selected, and the :text keyword can be used to label the button.

(contain (make-instance 'radio-button
                        :text "Radio Button"
                        :selected t))

Figure 3.7 An explicitly created radio button

Although a single radio button is of limited use, having an explicit radio button class gives you greater flexibility, since associated radio buttons need not be physically grouped together. Generally, the easiest way of creating a group of radio buttons is by using a button panel, but doing so means that they will be geometrically, as well as semantically, connected.

CAPI User Guide (Macintosh version) - 30 Aug 2011