Next: Pre-defined pushbuttons, Previous: Static label, Up: Widgets [Contents]
The pushbutton is a clickable widget defined with the
<button></button>
tags.
<label></label>
The <label>string</label>
directive sets the text label of
the pushbutton. If no label and pixmap is given for the button,
gtkdialog will use OK as default.
<input file></input>
When creating buttons, the <input file>filename</input>
tag can be used to insert a pixmap into the button. The filename
must be a pixmap file. Gtkdialog will find this file with the
locate
utility if necessary.
The pushbuttons can contain a label and a pixmap simultaneously. For
this you have to use the <label></label>
and the
<input file></input>
as the next example shows:
<button> <input file>/usr/share/GUIcompletion/button_save.xpm</input> <label>The label</label> </button>
<action></action>
The <action>command</action>
directive tells the gtkdialog
what to do, when the button is pressed. If the action is not given
explicitly the gtkdialog uses the default action, which is to exit
the program. In this case the printed variable list will
contain a variable named EXIT, with the label of the activated
button as value.
The buttons can handle more than one actions simultaneously. If there
are more <action></action>
directive for the given button, they
will be executed one by one, in the right order.
<visible></visible>
The <visible>state</visible>
specify the initial visibility
of the button. The state can be either enabled
or
disabled
. When a button is disabled, it is shaded and can not be
activated by mouse or keyboard.