ttk::checkbutton invoke
Turns the button over, as a click does, and runs its command.
PATHNAME invoke
Description
Sets the variable to -offvalue when it has the value of -onvalue, else to -onvalue. 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::checkbutton .tciv -variable tciv
> .tciv invoke
> list $tciv [.tciv state]
1 selected
% ttk::checkbutton .tciv2 -variable tciv2 -state disabled
> .tciv2 invoke
> info exists tciv2
0
Errors
% ttk::checkbutton .tciv3; .tciv3 invoke x
wrong # args: should be ".tciv3 invoke"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1