
ToggleButton widgets and gadgets
12.3.2 ToggleButton Resources
Since ToggleButtons are fairly simple objects, there are only a few resources associated with them aside from those
inherited from the Label class. Probably the most important of these resources is XmNindicatorType, which
controls whether the selection indicator is a square or a diamond and indicates whether the ToggleButtons are part of a
CheckBox or a RadioBox. The resource can be set to XmN_OF_MANY, which specifies a square−shaped indicator that
indicates that multiple ToggleButtons in the same group can be selected, or XmONE_OF_MANY, which specifies a
diamond−shaped indicator that indicates that only one ToggleButton in the group may be set. Applications rarely set
this resource directly, however, because the convenience routines that create RadioBoxes and CheckBoxes set the
resource automatically.
When you are grouping ToggleButtons together in a single manager widget, the Motif toolkit expects you to use a
RowColumn widget. The RowColumn widget has several resources intrinsic to its class that control the behavior of
ToggleButton children. Setting the RowColumn resource XmNradioBehavior to True automatically changes the
XmN-indicatorType resource of every ToggleButton managed by the RowColumn to XmONE_OF_MANY, which
provides the exclusive RadioBox behavior. Setting XmNradioBehavior to False sets the XmNindicatorType
to XmN_OF_MANY ...