1<TITLE>radiobox - Create and manipulate a radiobox widget</TITLE> 2<H1>radiobox - Create and manipulate a radiobox widget</H1> 3 4</pre><H2>SYNOPSIS</H2> 5<B>radiobox<I> <I>pathName </I>?<I>options</I>? 6</pre><H2>INHERITANCE</H2> 7itk::Widget <- labeledframe <- radiobox 8</pre><H2>STANDARD OPTIONS</H2> 9<P> 10<table cellpadding=5> 11<td valign=top> 12<B>background</B><br> 13<B>foreground</B><br> 14</td> 15<td valign=top> 16<B>borderWidth</B><br> 17<B>relief</B><br> 18</td> 19<td valign=top> 20<B>cursor</B><br> 21<B>selectColor</B><br> 22</td> 23<td valign=top> 24<B>disabledForeground</B><br> 25</td> 26</table> 27<P> 28See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/options.n.html"> "options" </A> manual entry for details on the standard options. 29</pre><H2>INHERITED OPTIONS</H2> 30<P> 31<table cellpadding=5> 32<td valign=top> 33<B>labelBitmap</B><br> 34<B>labelPos</B><br> 35</td> 36<td valign=top> 37<B>labelFont</B><br> 38<B>labelText</B><br> 39</td> 40<td valign=top> 41<B>labelImage</B><br> 42<B>labelVariable</B><br> 43</td> 44<td valign=top> 45<B>labelMargin</B><br> 46</td> 47</table> 48<P> 49See the "labeledframe" class manual entry for details on the 50inherited options. 51</pre><H2>WIDGET-SPECIFIC OPTIONS</H2> 52<P> 53<pre> 54Name: <B>command</B> 55Class: <B>Command</B> 56Command-Line Switch: <B>-command</B> 57</pre> 58<UL> 59Specifies a Tcl command procedure to be evaluated following a change in 60the current radio box selection. 61</UL> 62<P> 63</pre><HR> 64 65</pre><H2>DESCRIPTION</H2> 66<P> 67The <B>radiobox</B> command creates a radio button box widget 68capable of adding, inserting, deleting, selecting, and configuring 69radiobuttons as well as obtaining the currently selected button. 70 71</pre><H2>METHODS</H2> 72<P> 73The <B>radiobox</B> command creates a new Tcl command whose 74name is <I>pathName</I>. This 75command may be used to invoke various 76operations on the widget. It has the following general form: 77<pre> 78<I>pathName option </I>?<I>arg arg ...</I>? 79</pre> 80<I>Option</I> and the <I>arg</I>s 81determine the exact behavior of the command. 82<P> 83Many of the widget commands for the <B>radiobox</B> take as one argument an 84indicator of which radiobutton of the radiobox to operate on. These indicators 85are called <I>indexes</I> and allow reference and manipulation of radiobuttons. 86Radiobox indexes may be specified in any of the following forms: 87<DL> 88<DT> <I>number</I> 89</I></B> 90<DD> Specifies the radiobutton numerically, where 0 corresponds to the top 91radiobutton of the radiobox. 92</DL> 93<DL> 94<DT> <B>end</B> 95</I></B> 96<DD> Indicates the last radiobutton of the radiobox. 97</DL> 98<DL> 99<DT> <I>pattern</I> 100</I></B> 101<DD> If the index doesn't satisfy one of the above forms then this 102form is used. <I>Pattern</I> is pattern-matched against the tag of 103each radiobutton in the radiobox, in order from top to bottom, 104until a matching entry is found. The rules of <B>Tcl_StringMatch</B> 105are used. 106 107</DL> 108</pre><H2>WIDGET-SPECIFIC METHODS</H2> 109<DL> 110<DT> <I>pathName <B>add</B> <I>tag</I> ?<I>option value option value</I>? 111</I></B> 112<DD> Adds a new radiobutton to the radiobuttond window on the bottom. The command 113takes additional options which are passed on to the radiobutton as construction 114arguments. These include the standard Tk radiobutton options. The tag is 115returned. 116</DL> 117<DL> 118<DT> <I>pathName <B>buttonconfigure</B> <I>index</I> ?<I>options</I>? 119</I></B> 120<DD> This command is similar to the <B>configure</B> command, except that 121it applies to the options for an individual radiobutton, 122whereas <B>configure</B>applies to the options for the radiobox as a whole. 123<I>Options</I> may have any of the values accepted by the <B>add</B> 124widget command. If <I>options</I> are specified, options are modified 125as indicated in the command and the command returns an empty string. 126If no <I>options</I> are specified, returns a list describing 127the current options for entry <I>index</I> (see <B>Tk_ConfigureInfo</B> for 128information on the format of this list). 129</DL> 130<DL> 131<DT> <I>pathName <B>cget</B> <I>option</I> 132</I></B> 133<DD> Returns the current value of the configuration option given 134by <I>option</I>. 135<I>Option</I> may have any of the values accepted by the <B>radiobox</B> 136command. 137</DL> 138<DL> 139<DT> <I>pathName</I> <B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>? 140</I></B> 141<DD> Query or modify the configuration options of the widget. 142If no <I>option</I> is specified, returns a list describing all of 143the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for 144information on the format of this list). If <I>option</I> is specified 145with no <I>value</I>, then the command returns a list describing the 146one named option (this list will be identical to the corresponding 147sublist of the value returned if no <I>option</I> is specified). If 148one or more <I>option-value</I> pairs are specified, then the command 149modifies the given widget option(s) to have the given value(s); in 150this case the command returns an empty string. 151<I>Option</I> may have any of the values accepted by the <B>radiobox</B> 152command. 153</DL> 154<DL> 155<DT> <I>pathName <B>delete</B> <I>index</I> 156</I></B> 157<DD> Deletes a specified radiobutton given an <I>index</I>. 158</DL> 159<DL> 160<DT> <I>pathName <B>deselect</B> <I>index</I> 161</I></B> 162<DD> Deselects a specified radiobutton given an <I>index</I>. 163</DL> 164<DL> 165<DT> <I>pathName <B>flash</B> <I>index</I> 166</I></B> 167<DD> Flashes a specified radiobutton given an <I>index</I>. 168</DL> 169<DL> 170<DT> <I>pathName <B>get</B> 171</I></B> 172<DD> Returns the tag of the currently selected radiobutton. 173</DL> 174<DL> 175<DT> <I>pathName <B>index</B> <I>index</I> 176</I></B> 177<DD> Returns the numerical index corresponding to index. 178</DL> 179<DL> 180<DT> <I>pathName <B>insert <I>index</I> <I>tag</I> ?<I>option value option value ...</I>? 181</I></B> 182<DD> Same as the <B>add</B> command except that it inserts the new 183radiobutton just before the one given by <I>index</I>, instead of appending 184to the end of the radiobox. The <I>option</I>, and <I>value</I> 185arguments have the same interpretation as for the <B>add</B> widget 186command. 187</DL> 188<DL> 189<DT> <I>pathName <B>select</B> <I>index</I> 190</I></B> 191<DD> Selects a specified radiobutton given an <I>index</I>. 192 193</DL> 194</pre><H2>EXAMPLE</H2> 195<pre> 196 radiobox .rb -labeltext Fonts 197 .rb add times -text Times 198 .rb add helvetica -text Helvetica 199 .rb add courier -text Courier 200 .rb add symbol -text Symbol 201 .rb select courier 202 203 pack .rb -padx 10 -pady 10 -fill both -expand yes 204</pre> 205 206</pre><H2>AUTHORS</H2> 207Michael J. McLennan 208<P> 209Mark L. Ulferts 210</pre><H2>KEYWORDS</H2> 211radiobox, widget 212