style -
Control overall look and feel of widgets
style option ?args?
Each widget is assigned a style,
which specifies the set of elements making up the widget
and how they are arranged, along with dynamic and default
settings for element resources. By default, the style name
is the same as the widget's class.
A theme is a collection of elements and styles
which controls the overall look and feel of an application.
The style command takes the following arguments:
-
style default style ? -option value... ?
- Sets the default value of the specified option(s) in style.
-
style map style ?-option { statespec value } ... ?
- Sets dynamic values of the specified option(s) in style.
See "STATE MAPS", below.
-
style layout style ?layoutSpec?
- Define the widget layout for style style.
See "LAYOUTS" below for the format of layoutSpec.
If layoutSpec is omitted, return the layout specification
for style style.
-
style element create elementName type ?args...?
- Creates a new element in the current theme of type type.
The only built-in element type is pixmap (see pixmap(n)),
although themes may define other element types
(see TTK_RegisterElementFactory).
- style element names
- Returns a list of all elements defined in the current theme.
-
style theme create themeName ?-parent basedon? ?-settings script... ?
- Creates a new theme. It is an error if themeName already exists.
If -parent is specified, the new theme will inherit
styles, elements, and layouts from the parent theme basedon.
If -settings is present, script is evaluated in the
context of the new theme as per style theme settings.
-
style theme settings themeName script
- Temporarily sets the current theme to themeName,
evaluate script, then restore the previous theme.
Typically script simply defines styles and elements,
though arbitrary Tcl code may appear.
- style theme names
- Returns a list of the available themes.
-
style theme use themeName
- Sets the current theme to themeName, and refreshes all widgets.
@@@ describe...
@@@ describe...
tile-intro, widget, pixmap
style, theme, appearance