1iwidgets::buttonbox  − Create and manipulate a manager widget for
2buttons iwidgets::buttonbox pathName  ?options?   itk::Widget  <‐

background cursor

5See  the  "options"  manual entry for details on the standard op‐
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

Tk_GetPixels. The default is 5 pixels.

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

Tk_GetPixels. The default is 5 pixels.

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.
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‐

Name option ?arg arg ...? Option and the args determine the ex‐

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‐

es and allow reference and manipulation of buttons regardless of

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.

pattern If the index doesn’t satisfy one of the above forms then

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

Tcl_StringMatch are used.


pathName add tag args Add a button distinguished by tag to the

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

index ?options? This command is similar to the configure com‐

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‐

fo for information on the format of this list). pathName cget

option Returns the current value of the configuration option giv‐

66en by option.  Option may have any of the values accepted by  the

iwidgets::buttonbox command. pathName configure ?option? ?value

option value ...? Query or modify the configuration options of

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‐

tion may have any of the values accepted by the iwidgets::button‐

box command. pathName default index Sets the default button to

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‐

dex Hides the button denoted by index. This doesn’t remove the

84button permanently, just inhibits its  display.   pathName  index

index Returns the numerical index corresponding to index. path‐

Name insert index tag ?option value option value ...? Same as

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
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
103 pack .bb ‐expand yes ‐fill both  Bret  A.  Schuhmacher  Mark  L.
104Ulferts buttonbox, pushbutton, button, widget