beetlebug▾
/

ttk::panedwindow state

Gives the state flags of the widget, or turns flags on and off.

PATHNAME state ?STATESPEC?

Description

With no argument, gives the list of the flags that are on. The flags are active, disabled, focus, pressed, selected, background, alternate, invalid, readonly, hover, and the user flags user1 to user6.

STATESPEC is a list of flags. A flag turns on, and a flag with a ! before it turns off. The result is a spec that undoes the change: the flags that changed, each with the opposite form. A script can give that result to state to restore the old flags.

Returns

The flags that are on, or a spec that undoes the change.

Examples

% ttk::panedwindow .tpwsx
> .tpwsx state {disabled}
!disabled

% ttk::panedwindow .tpwsx2
> .tpwsx2 state {disabled invalid}
> .tpwsx2 instate {disabled invalid}
1

% ttk::panedwindow .tpwsx3
> set undo [.tpwsx3 state readonly]
> .tpwsx3 state $undo
> .tpwsx3 instate readonly
0

Errors

% ttk::panedwindow .tpwsx4; .tpwsx4 state bogus
Invalid state name bogus
-errorcode NONE

% ttk::panedwindow .tpwsx5; .tpwsx5 state a b
wrong # args: should be ".tpwsx5 state state-spec"
-errorcode NONE

Facts

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

See also