Buttons are basic components that activate functionality in Motif
applications. Buttons operate as standalone interface components and
are also used in building Menus and DialogBoxes.
Using PushButtons
A PushButton contains a label that indicates the function of the button. The label can be either text or an image. The Motif PushButton has a 3-dimensional appearance. A PushButton appears raised out of the screen. When the button is pushed, it appears recessed into the screen. A typical PushButton is shown below.
To activate the functionality of a PushButton with the mouse, move the pointer to the PushButton and click Button 1.
If the PushButton has the input focus, you can activate it from the
keyboard by pressing
,
<Select>, or
.
Using ToggleButtons
A ToggleButton is a button that has two states: on and off. ToggleButtons typically allow you to select one or more options from a list of choices. Every ToggleButton has a label and a graphic that indicates its current state.
RadioButtons are a group of ToggleButtons where only one of the ToggleButtons can be on at any one time, like an old-style car radio. The associated graphic indicator for the state of RadioButtons is a diamond. When the diamond is filled in, it indicates that the button is on; when the diamond is empty, it indicates that the button is off, as shown below.
To select a RadioButton with the mouse, move the pointer to the RadioButton's label and click Button 1.
Clicking on a RadioButton that is in the off state changes its state to on. Any other RadioButton in the group that is in the on state is set to the off state. Clicking on a RadioButton that is currently on causes the button to remain on.
If a RadioButton has the input focus, you can turn it on by
pressing <Select> or
.
Any RadioButton in the group that currently is set is turned off. You
can navigate through a group of RadioButtons with the arrow keys.
CheckButtons are a group of ToggleButtons where any number of the ToggleButtons can be on at the same time. The CheckButton's associated graphic indicator is usually a square, which is filled in or differently colored when the button is on. A typical group of CheckButtons is shown below.
To select a CheckButton with the mouse move the pointer to the CheckButton's label and click Button 1.
Clicking on a CheckButton in the off state changes its state to on. The button retains this setting as you select other CheckButtons. Clicking on a CheckButton in the on state changes its state to off.
If a CheckButton has the input focus, you can toggle between the on
and off states by pressing <Select> or
.
You can navigate through a group of CheckButtons with the arrow keys.