beetlebug▾
/

radiobutton invoke

Selects the radiobutton and runs its command, as a click does.

PATHNAME invoke

Description

Sets the variable to -value, and then runs the -command script at the global level. A radiobutton with -state disabled keeps its state and gives an empty string. An error of the script is the error of invoke.

Returns

The result of the -command script, or an empty string.

Examples

% radiobutton .iv -variable iv -value small -command {list size $iv}
> .iv invoke
size small

% radiobutton .iv2 -variable iv2 -value a -state disabled
> .iv2 invoke
> set iv2

Errors

% radiobutton .iv3; .iv3 invoke x
wrong # args: should be ".iv3 invoke"
-errorcode NONE

% radiobutton .iv4 -command {error boom}; .iv4 invoke
boom
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also