first previous next last contents


add_radio name onval offval variable value command

Multiple radio buttons are grouped together to form a set of which any one button can be activated at any one time. The add_radio command adds commands to menus in a similar fashion to the add_command command, but has two additional arguments; variable and value.

Each radio button within a group uses the same variable with differing values. When a radio button is selected the global Tcl variable is set with the associated value and the command is executed. A useful tip is that the contents of the variable may be passed to the command as an argument using \$variable.

As each group can specify its own variable, multiple radio button groups are possible .

first previous next last contents
This page is maintained by staden-package. Last generated on 1 March 2001.