beetlebug▾
/

ttk::style lookup

Gives the value of an option of a style that applies in a state.

ttk::style lookup STYLE OPTION ?STATE? ?DEFAULT?

Description

Gives the value of OPTION for a widget of STYLE with the state flags of STATE, a list of flags. The value comes from map first, then from configure, then from the base styles. With no value, gives DEFAULT, or an empty string.

Returns

A value.

Examples

% ttk::style configure Warn.TLabel -foreground orange
> ttk::style map Warn.TLabel -foreground {disabled gray}
> list [ttk::style lookup Warn.TLabel -foreground] [ttk::style lookup Warn.TLabel -foreground disabled]
orange gray

% ttk::style lookup Nosuch.TLabel -nosuch {} none
none

Errors

% ttk::style lookup
wrong # args: should be "ttk::style lookup style -option ?state? ?default?"
-errorcode TCL WRONGARGS

Facts

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

See also