beetlebug▾
/

ttk::radiobutton invoke

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

PATHNAME invoke

Description

Sets the variable to the -value of the button, then runs -command at the global level and gives its result. A button with the state flag disabled makes no change, runs no script, and gives an empty string.

Returns

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

Examples

% ttk::radiobutton .triv -variable triv -value x
> .triv invoke
> list $triv [.triv state]
x selected

% ttk::radiobutton .triv2 -variable triv2 -value x -state disabled
> .triv2 invoke
> info exists triv2
0

Errors

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

Facts

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

See also