1iwidgets::radiobox  −  Create  and  manipulate  a radiobox widget

iwidgets::radiobox pathName ?options? itk::Widget <‐ iwid‐

3gets::Labeledframe <‐ iwidgets::Radiobox

background borderWidth cursor disabledForeground

foreground relief selectColor

6See  the  "options"  manual entry for details on the standard op‐
7tions.

labelBitmap labelFont labelImage labelMargin

labelPos labelText labelVariable

10See the "labeledframe" class manual entry for details on the  in‐
11herited options.
12Name:   command
13Class:  Command
14Command‐Line Switch:    ‐command
15Specifies  a  Tcl  command  procedure to be evaluated following a
16change in the current radio box selection.
17Name:   orient
18Class:  Orient
19Command‐Line Switch:    ‐orient
20Default Value:  vertical
21Specifies the orientation of  the  radiobuttons  within  the  ra‐
22diobox.  Valid values are either "horizontal" or "vertical".
23
24The  iwidgets::radiobox command creates a radio button box widget
25capable of adding, inserting, deleting, selecting, and  configur‐
26ing radiobuttons as well as obtaining the currently selected but‐
27ton.
28
29The iwidgets::radiobox command creates a new  Tcl  command  whose
30name is pathName.  This command may be used to invoke various op‐
31erations on the widget.  It has the following general form: path‐

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

33act behavior of the command.  Many of the widget commands for the

radiobox take as one argument an indicator of which radiobutton

35of the radiobox to operate on.  These indicators are  called  in‐

dexes and allow reference and manipulation of radiobuttons. Ra‐

37diobox indexes may be specified in any of  the  following  forms:

number Specifies the radiobutton numerically, where 0 corresponds

39to the top radiobutton of the radiobox.  end Indicates  the  last
40radiobutton of the radiobox.  pattern If the index doesn’t satis‐
41fy one of the above forms then this form  is  used.   Pattern  is
42pattern‐matched  against  the  tag of each radiobutton in the ra‐
43diobox, in order from top to bottom, until a  matching  entry  is
44found.  The rules of Tcl_StringMatch are used.
45

pathName add tag ?option value option value? Adds a new ra‐

47diobutton to the radiobuttond window on the bottom.  The  command
48takes  additional  options which are passed on to the radiobutton
49as construction arguments.  These include  the  standard  Tk  ra‐
50diobutton  options.  The tag is returned.  pathName buttonconfig‐

ure index ?options? This command is similar to the configure

52command,  except that it applies to the options for an individual
53radiobutton, whereas configureapplies to the options for the  ra‐
54diobox  as  a whole.  Options may have any of the values accepted
55by the add widget command.  If options are specified, options are
56modified  as  indicated in the command and the command returns an
57empty string.  If no options are specified, returns  a  list  de‐
58scribing 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‐

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

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

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

64the widget.  If no option is specified, returns a list describing
65all of the available options for pathName  (see  Tk_ConfigureInfo
66for information on the format of this list).  If option is speci‐
67fied with no value, then the command returns  a  list  describing
68the  one  named option (this list will be identical to the corre‐
69sponding sublist of the value returned if  no  option  is  speci‐
70fied).  If one or more option−value pairs are specified, then the
71command modifies the given widget option(s)  to  have  the  given
72value(s);  in this case the command returns an empty string.  Op‐

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

diobox command. pathName delete index Deletes a specified ra‐

75diobutton given an index.  pathName deselect  index  Deselects  a
76specified  radiobutton  given  an  index.   pathName  flash index
77Flashes a specified radiobutton given an index.  pathName get Re‐
78turns  the  tag  of the currently selected radiobutton.  pathName

index index Returns the numerical index corresponding to index.

pathName insert index tag ?option value option value ...? Same

81as the add command except that it  inserts  the  new  radiobutton
82just  before  the one given by index, instead of appending to the
83end of the radiobox.  The option, and value  arguments  have  the
84same  interpretation as for the add widget command.  pathName se‐

lect index Selects a specified radiobutton given an index.

86
87 package require Iwidgets 4.0
88 iwidgets::radiobox .rb ‐labeltext Fonts
89 .rb add times ‐text Times
90 .rb add helvetica ‐text Helvetica
91 .rb add courier ‐text Courier
92 .rb add symbol ‐text Symbol
93 .rb select courier
94
95 pack .rb ‐padx 10 ‐pady 10 ‐fill both ‐expand yes
96
97Michael J. McLennan Mark L. Ulferts radiobox, widget
98
99
100
101
102
103
104
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
Impressum