ttk::style element
Lists the elements, gives their options, and makes new elements.
ttk::style element names
ttk::style element options ELEMENT
ttk::style element create NAME TYPE ?ARG ...?
Description
An element is a part of the layout of a widget, such as label, border, or Checkbutton.indicator. names gives the elements of the current theme. options gives the options of an element, or an empty list for an element that does not exist.
create makes an element of TYPE image or from, as in Tk. In ztk, CSS draws each part of a widget, so a new element has no effect on the look. A script of Tk that makes elements runs.
Returns
A list, or an empty string.
Examples
% ttk::style element options Button.label
-compound -space -text -font -foreground -underline -width -anchor -justify -wraplength -embossed -image -stipple -background
% ttk::style element create My.field from default
> expr {"My.field" in [ttk::style element names]}
1
Errors
% ttk::style element create My.x bogus
No such element type bogus
-errorcode NONE
% ttk::style element bogus
bad command "bogus": must be create, names, or options
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1