hwtk::radiobutton - Mutually exclusive option widget.
hwtk::radiobutton widgets are used in groups to show or change a set of mutually-exclusive options. Radio buttons are linked to a Tcl variable, and have an associated value; when a radio button is clicked, it sets the variable to its associated value.
hwtk::radiobutton - pathName ?option value? ...
-clientdata, clientData, ClientData
-helpcommand, helpcommand, Command
-textvariable, textVariable, Variable
-underline, underline, Underline
Command-Line Name: -command
Database Name: command
Database Class: Command
A Tcl script to evaluate whenever the widget is invoked.
Command-Line Name: -value
Database Name: Value
Database Class: Value
The value to store in the associated -variable when the widget is selected.
Command-Line Name: -variable
Database Name: variable
Database Class: Variable
The name of a global variable whose value is linked to the widget. Default value is ::selectedButton.
In addition to the standard configure, cget, identify, instate, and state commands, radiobutton support the following additional widget commands:
pathName invoke
Sets the -variable to the -value, selects the widget, and evaluates the associated -command. Returns the result of the -command, or the empty string if no -command is specified.
#::hwtk::radiobutton
::hwtk::dialog .d -title "::hwtk::radiobutton"
set fontsize 12
foreach i {10 12 14 } {
pack [hwtk::radiobutton [.d recess].rb$i -text "Point Size $i" -variable fontsize -value $i -help "Select point size"]
}
.d post