- NAME
- ButtonBox - a set of Buttons with horizontal or vertical layout
- SYNOPSIS
- ButtonBox pathName ?option value...?
- DESCRIPTION
- WIDGET-SPECIFIC OPTIONS
- -background or -bg
- -default
- -homogeneous (read-only)
- -orient (read-only)
- -padx
- -pady
- -spacing
- -state
- WIDGET COMMAND
- pathName add
?option value...?
- pathName cget
option
- pathName configure
?option? ?value option value ...?
- pathName delete
index
- pathName index
index
- pathName insert
index ?option value...?
- pathName invoke
index
- pathName itemcget
index
option
- pathName itemconfigure
index
?option? ?value option value ...?
- pathName setfocus
index
NAME
ButtonBox - a set of Buttons with horizontal or vertical layout
SYNOPSIS
ButtonBox pathName ?option value...?
DESCRIPTION
A ButtonBox arranges Buttons horizontally or vertically.
Some commands take an index as argument indicating the Button to which
it applies. This index may be specified in any of the following forms:
- number
-
Specifies the Button numerically, where 0 corresponds
to the first added Button, 1 to the next, and so on.
- end or last
-
Indicates the last item added.
- default
-
Indicates the default Button.
- name
-
Indicates the Button whose -name option is name.
- text
-
Indicates the Button whose -text option is text.
The ButtonBox widget is used by Slab Dialog and therefore by the derived dialogs MessageDlg, PasswdDlg, ProgressDlg, SelectColor and SelectFont.
"Read-only" options must be supplied as arguments to the ButtonBox command. The values of these options cannot be changed later by calling the configure widget command.
- -background
-
Specifies a default background color for all added Buttons and for the frame.
For themed widgets, the Button color is not set.
- -default
-
Specifies the default Button of the ButtonBox. The value is an integer
referencing the n-th added Button, starting from 0.
If this value is -1 (the default), all Buttons will be drawn with their -default
option set to disabled, and this value can not be changed. If this value is
not -1, the associated Button is drawn with its -default option set to active and
the others are drawn with their -default option set to normal. The value can be changed
by the configure widget command.
- -homogeneous (read-only)
-
Specifies whether or not Buttons must have the same width for horizontal layout.
- -orient (read-only)
-
Specifies the orientation of the ButtonBox. If this option is horizontal
(the default), Buttons are added from left to right.
If this option is vertical, Buttons are added from top to bottom.
- -padx
-
Specifies a default value for the -padx option of all added Buttons.
This option has no effect for themed widgets.
- -pady
-
Specifies a default value for the -pady option of all added Buttons.
Option has no effect for themed wigets.
- -spacing
-
Specifies the default spacing between Buttons. This value can be changed before each
call to add.
- -state
-
Specifies a state for all the Buttons in the ButtonBox. Can be normal, active,
or disabled.
- pathName add
?option value...?
-
Add a Button to the ButtonBox. See Button for a description of the options.
- pathName cget option
-
Returns the current value of the configuration option given by option.
Argument option may have any of the values accepted by the creation command ButtonBox.
- pathName configure
?option? ?value option value ...?
-
Query or modify the configuration options of the widget. If no option is specified,
returns a list describing all of the available options for pathName.
If option is specified with no value, then the command returns a list
describing the one named option (this list will be identical to the corresponding
sublist of the value returned if no option is specified). If one or
more option-value pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
Argument option may have any of the values accepted by the creation command ButtonBox.
Read-only options cannot be modified.
- pathName delete
index
-
Delete the Button at index from the ButtonBox.
- pathName index
index
-
Return the numerical index corresponding to the item.
- pathName insert
index ?option value...?
-
Insert a new Button into the ButtonBox before the given index.
- pathName invoke
index
-
Invoke the Button given by index.
- pathName itemcget
index
option
-
Returns the current value of a configuration option for the item.
Argument option may have any of the values accepted by the add widget command
for item (Button) creation.
- pathName itemconfigure
index
?option? ?value option value ...?
-
This command is similar to the configure command, except that it applies to the
options for an individual item, whereas configure applies to the options for
the widget as a whole. Argument option may have any of the values accepted by the add widget command
for item (Button) creation. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options cannot be modified.
- pathName setfocus
index
-
Set the focus to the Button given by index.
Copyright © 1998-1999 UNIFIX.
Copyright © 2001-2002 ActiveState Corp.
Copyright © 2017-2025 CitizenEarth Internet Ltd.