The radio class is for radio buttons, which, like the check class, are represented by boolean valued slotfiller variables, but with the additional stipulation that one and only one of the values is 1. A button is marked "on" if the corresponding value is 1 and "off" if it is 0. When a button is "on" it has a sunken appearance and is the color specified by the fg attribute, and when "off" it has a raised appearance and is the color specified by the bg attribute. A click with the left mouse button on a radio button that is "off" turns the button "on" and causes the button that had been "on" to be turned "off"; the values of the A+ variables are changed accordingly, to 1 for "on" and 0 for "off". Therefore, if a callback function is defined for the underlying variable, it is called whenever a button is selected, with the path argument p being equal to the symbolic index of the selected button. Note that even though there are two value changes, a callback function associated with the underlying global variable of a radio button is called only once, and the path argument of the callback function refers to the value that changed from 0 to 1.Visual Representation
The underlying slotfiller variable can of course be changed by program, as long as its new values are boolean and exactly one of them is 1. Thus if rd is a radio andrdû(`a`b`c`d;(1;0;0;0))its setting can be changed by the statement(1Ørd)[0 2]û(0;1).An aid is provided by s: if one value is set to 1 by a symbolic-pick assignment, then s sets any other value that is 1 to 0. Hence the change in setting just instanced could also be accomplished by the statement
with s providing the necessary (`aØrd)û0 action.
The label areas cannot be edited.
The slot areas that appear in the display and their arrangement can be controlled by the setting of the geometry attribute; see "The Geometry Attribute", in "The Slot Display Class". All slot areas specified for display by this attribute are completely displayed; radio displays never have scrollbars.
Attributesrdû(`one`two`three;(0;1;0)) `rd is `radio `rd has (`shelltitle;'rd') show `rd
See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the radio display class, as well as lists of colors and fonts. The keys in the Table of All Display Attributes that pertain to this class are I, ALL, CNFT, NFT, and TOP.
The attributes that are meaningful for the radio display class (other than the print... attributes) are:
acceptfocus(Point the mouse cursor to an attribute to display a short description at the bottom of the screen)
|firstname.lastname@example.org||© Copyright 19952008 Morgan Stanley Dean Witter & Co. All rights reserved.|