beetlebug▾
/

checkbutton toggle

Turns the checkbutton on when it is off, and off when it is on.

PATHNAME toggle

Description

Changes the variable between -onvalue and -offvalue. It runs no -command, and it works also with -state disabled.

Returns

An empty string.

Examples

% checkbutton .tg -variable tg
> .tg toggle
> set tg
1

Errors

% checkbutton .tg2; .tg2 toggle x
wrong # args: should be ".tg2 toggle"
-errorcode NONE

Facts

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

See also