1iwidgets::buttonbox − Create and manipulate a manager widget for
2buttons iwidgets::buttonbox pathName ?options? itk::Widget <‐
3iwidgets::buttonbox
5See the "options" manual entry for details on the standard op‐
6tions.
7Name: orient
8Class: Orient
9Command‐Line Switch: ‐orient
10Orientation of the button box: horizontal or vertical. The de‐
11fault is horizontal.
12Name: padX
13Class: PadX
14Command‐Line Switch: ‐padx
15Specifies a non‐negative padding distance to leave between the
16button group and the outer edge of the button box in the x direc‐
17tion. The value may be given in any of the forms acceptable to
19Name: padY
20Class: PadY
21Command‐Line Switch: ‐pady
22Specifies a non‐negative padding distance to leave between the
23button group and the outer edge of the button box in the y direc‐
24tion. The value may be given in any of the forms acceptable to
26
27The iwidgets::buttonbox command creates a manager widget for con‐
28trolling buttons. The button box also supports the display and
29invocation of a default button. The button box can be configured
30either horizontally or vertically.
31
32The iwidgets::buttonbox command creates a new Tcl command whose
33name is pathName. This command may be used to invoke various op‐
34erations on the widget. It has the following general form: path‐
36act behavior of the command. Many of the widget commands for the
37buttonbox take as one argument an indicator of which button of
38the button box to operate on. These indicators are called index‐
40their current map state. buttonbox indexes may be specified in
41any of the following forms: number Specifies the button numeri‐
42cally, where 0 corresponds to the left/top‐most button of the
43button box. end Indicates the right/bottom‐most button of the
44button box. default Indicates the current default button of the
45button box. This is the button with the default ring displayed.
47this form is used. Pattern is pattern‐matched against the tag of
48each button in the button box, in order from left/top to
49right/left, until a matching entry is found. The rules of
51
53end of the button box. If additional arguments are present they
54specify options to be applied to the button. See PushButton for
55information on the options available. pathName buttonconfigure
57mand, except that it applies to the options for an individual
58button, whereas configure applies to the options for the button
59box as a whole. Options may have any of the values accepted by
60the PushButton command. If options are specified, options are
61modified as indicated in the command and the command returns an
62empty string. If no options are specified, returns a list de‐
63scribing the current options for entry index (see Tk_ConfigureIn‐
66en by option. Option may have any of the values accepted by the
69the widget. If no option is specified, returns a list describing
70all of the available options for pathName (see Tk_ConfigureInfo
71for information on the format of this list). If option is speci‐
72fied with no value, then the command returns a list describing
73the one named option (this list will be identical to the corre‐
74sponding sublist of the value returned if no option is speci‐
75fied). If one or more option−value pairs are specified, then the
76command modifies the given widget option(s) to have the given
77value(s); in this case the command returns an empty string. Op‐
80the button given by index. This causes the default ring to ap‐
81pear arround the specified button. pathName delete index Deletes
82the button given by index from the button box. pathName hide in‐
84button permanently, just inhibits its display. pathName index
87the add command except that it inserts the new button just before
88the one given by index, instead of appending to the end of the
89button box. The option, and value arguments have the same inter‐
90pretation as for the add widget command. pathName invoke ?index?
91Invoke the command associated with a button. If no arguments are
92given then the current default button is invoked, otherwise the
93argument is expected to be a button index. pathName show index
94Display a previously hidden button denoted by index.
95 package require Iwidgets 4.0
96 iwidgets::buttonbox .bb
97
98 .bb add Yes ‐text Yes ‐command "puts Yes"
99 .bb add No ‐text No ‐command "puts No"
100 .bb add Maybe ‐text Maybe ‐command "puts Maybe"
101 .bb default Yes
102
103 pack .bb ‐expand yes ‐fill both Bret A. Schuhmacher Mark L.
104Ulferts buttonbox, pushbutton, button, widget
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132