{"id":6311,"date":"2022-12-20T18:58:08","date_gmt":"2022-12-20T21:58:08","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ttkstyle-mann\/"},"modified":"2022-12-20T18:58:08","modified_gmt":"2022-12-20T21:58:08","slug":"ttkstyle-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ttkstyle-mann\/","title":{"rendered":"ttk::style (mann)"},"content":{"rendered":"<h1 align=\"center\">ttk::style<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a><br \/> <a href=\"#DEFINITIONS\">DEFINITIONS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#LAYOUTS\">LAYOUTS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ttk::style \u2212 Manipulate style database<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ttk::style<\/b> <i>option<\/i> ?<i>args<\/i>? ______________________________________________________________________________<\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">See also the Tcl\u20192004 conference presentation, available at https:\/\/tktable.sourceforge.net\/tile\/tile-tcl2004.pdf<\/p>\n<h2>DEFINITIONS <a name=\"DEFINITIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Each widget is assigned a <i>style<\/i>, which specifies the set of elements making up the widget and how they are arranged, along with dynamic and default settings for element options. By default, the style name is the same as the widget\u2019s class; this may be overridden by the <b>\u2212style<\/b> option.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A <i>theme<\/i> is a collection of elements and styles which controls the overall look and feel of an application.<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>ttk::style<\/b> command takes the following arguments: <b><br \/> ttk::style configure<\/b> <i>style<\/i> ?<i>\u2212option<\/i> ?<i>value option value&#8230;<\/i>? ?<\/p>\n<p style=\"margin-left:22%;\">Sets the default value of the specified option(s) in <i>style<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style map<\/b> <i>style<\/i> ?<i>\u2212option<\/i> <b>{<\/b> <i>statespec value&#8230;<\/i> <b>}<\/b>?<\/p>\n<p style=\"margin-left:22%;\">Sets dynamic values of the specified option(s) in <i>style<\/i>. Each <i>statespec \/ value<\/i> pair is examined in order; the value corresponding to the first matching <i>statespec<\/i> is used.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style lookup<\/b> <i>style \u2212option<\/i> ?<i>state<\/i> ?<i>default<\/i>??<\/p>\n<p style=\"margin-left:22%;\">Returns the value specified for <i>\u2212option<\/i> in style <i>style<\/i> in state <i>state<\/i>, using the standard lookup rules for element options. <i>state<\/i> is a list of state names; if omitted, it defaults to all bits off (the \u201cnormal\u201d state). If the <i>default<\/i> argument is present, it is used as a fallback value in case no specification for <i>\u2212option<\/i> is found.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style layout<\/b> <i>style<\/i> ?<i>layoutSpec<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Define the widget layout for style <i>style<\/i>. See <b>LAYOUTS<\/b> below for the format of <i>layoutSpec<\/i>. If <i>layoutSpec<\/i> is omitted, return the layout specification for style <i>style<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style element create<\/b> <i>elementName type<\/i> ?<i>args&#8230;<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Creates a new element in the current theme of type <i>type<\/i>. The only cross-platform built-in element type is <i>image<\/i> (see <b>ttk_image<\/b>(n)) but themes may define other element types (see <b>Ttk_RegisterElementFactory<\/b>). On suitable versions of Windows an element factory is registered to create Windows theme elements (see <b>ttk_vsapi<\/b>(n)).<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style element names<\/b><\/p>\n<p style=\"margin-left:22%;\">Returns the list of elements defined in the current theme.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style element options<\/b> <i>element<\/i><\/p>\n<p style=\"margin-left:22%;\">Returns the list of <i>element<\/i>\u2019s options.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style theme create<\/b> <i>themeName<\/i> ?<b>\u2212parent<\/b> <i>basedon<\/i>? ?<b>\u2212settings<\/b> <i><br \/> script&#8230;<\/i> ?<\/p>\n<p style=\"margin-left:22%;\">Creates a new theme. It is an error if <i>themeName<\/i> already exists. If <b>\u2212parent<\/b> is specified, the new theme will inherit styles, elements, and layouts from the parent theme <i>basedon<\/i>. If <b>\u2212settings<\/b> is present, <i>script<\/i> is evaluated in the context of the new theme as per <b>ttk::style theme settings<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style theme settings<\/b> <i>themeName script<\/i><\/p>\n<p style=\"margin-left:22%;\">Temporarily sets the current theme to <i>themeName<\/i>, evaluate <i>script<\/i>, then restore the previous theme. Typically <i>script<\/i> simply defines styles and elements, though arbitrary Tcl code may appear.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style theme names<\/b><\/p>\n<p style=\"margin-left:22%;\">Returns a list of all known themes.<\/p>\n<p style=\"margin-left:11%;\"><b>ttk::style theme use<\/b> ?<i>themeName<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Without an argument the result is the name of the current theme. Otherwise this command sets the current theme to <i>themeName<\/i>, and refreshes all widgets.<\/p>\n<h2>LAYOUTS <a name=\"LAYOUTS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">A <i>layout<\/i> specifies a list of elements, each followed by one or more options specifying how to arrange the element. The layout mechanism uses a simplified version of the <b>pack<\/b> geometry manager: given an initial cavity, each element is allocated a parcel. Valid options are: <b><br \/> \u2212side<\/b> <i>side<\/i><\/p>\n<p style=\"margin-left:22%;\">Specifies which side of the cavity to place the element; one of <b>left<\/b>, <b>right<\/b>, <b>top<\/b>, or <b>bottom<\/b>. If omitted, the element occupies the entire cavity.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212sticky [<\/b><i>nswe<\/i><b>]<\/b><\/p>\n<p style=\"margin-left:22%;\">Specifies where the element is placed inside its allocated parcel.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212children {<\/b> <i>sublayout&#8230;<\/i> <b>}<\/b><\/p>\n<p style=\"margin-left:22%;\">Specifies a list of elements to place inside the element.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For example:<\/p>\n<p style=\"margin-left:22%;\">ttk::style layout Horizontal.TScrollbar { <br \/> Scrollbar.trough \u2212children { <br \/> Scrollbar.leftarrow \u2212side left <br \/> Scrollbar.rightarrow \u2212side right <br \/> Horizontal.Scrollbar.thumb \u2212side left \u2212sticky ew <br \/> } <br \/> }<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ttk::intro(n), ttk::widget(n), photo(n), ttk_image(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">style, theme, appearance<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ttk::style \u2212 Manipulate style database <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3783,1],"tags":[2635,2911],"class_list":["post-6311","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-mann","tag-ttk_style"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6311"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6311\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}