14.3.6 Adding menu components

14.3.6.2 Radio components

A radio component is a special type of menu component, in which one, and only one, menu item is active at any time. For any radio component, one item always returnst, and the others always returnnil. The menu item that was selected last is the one that returnst.

Radio components are used to group together items, only one of which may be chosen at a time. Examples of radio components in the Common LispWorks environment include the sorting options available in different views of many tools; only one sorting method can be used at any time, and the commands to choose each method are grouped together as a single radio component in the View menu of a tool.

Click Radio Component in the button bar of the interface builder to add a radio component to the current interface. Radio components must be added as the children of a menu, and, like standard menu components, are not visible in the interface skeleton until items have been added. To add an item to a radio component, click Item. New items are automatically of the correct type for radio components. Note that you cannot add a submenu as an item in a radio component.

The way that radio components are indicated on-screen depends on the operating system or window manager you are running; a dot to the left of the selected item is common. On some systems, a diamond button is placed to the left of every item, and this is depressed for the item which is currently selected.

Like standard menu components, separators divide radio components from other items or components in a given menu.


Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996

Generated with Harlequin WebMaker