A choice item allows the user to select one string item from a pop-up list of items. Unlike a list box, only the currently selection is visible until the user pops-up the menu of choices.
Whenever the selection of a choice item is changed by the user, the choice item's callback procedure is invoked. A callback procedure is provided as an initialization argument when each choice item is created.
See also list-box%.
Creates a choice item. If label is a string, it is used as the label for the choice item.
If an ampersand (``&'') occurs in label, it is specially parsed; under Windows and X, the character following an ampersand is underlined in the displayed control to indicate a keyboard mnemonic. (Under MacOS, mnemonic underlines are not shown.) The underlined menumonic character must be a letter or a digit. The user can move the keyboard focus to the choice item by typing the mnemonic when the control's top-level-window contains the keyboard focus. The user must also hold down the Meta or Alt key if the keyboard focus is currently in a control that handles normal alphanumeric input. The ampersand itself is removed from label before it is displayed for the control; a double-ampersand in label is converted to a single ampersand (with no mnemonic underlining). Menumonic keyboard events are handled by on-traverse-char (but not under MacOS).
The choices list specifies the initial list of user-selectable items for the control. The initial set of choices determines the control's minimum graphical width (see Geometry Management for more information).
The callback procedure is called (with the event type 'choice) when the user selects a choice item (or re-selects the currently selected item).
The style argument is provided for future extensions. Currently, style must be the empty list.