{"id":6099,"date":"2022-12-20T18:57:55","date_gmt":"2022-12-20T21:57:55","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ttk_image-mann\/"},"modified":"2022-12-20T18:57:55","modified_gmt":"2022-12-20T21:57:55","slug":"ttk_image-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ttk_image-mann\/","title":{"rendered":"ttk_image (mann)"},"content":{"rendered":"<h1 align=\"center\">ttk_image<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#IMAGE STRETCHING\">IMAGE STRETCHING<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/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_image \u2212 Define an element based on an image<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ttk::style element create<\/b> <i>name<\/i> <b>image<\/b> <i>imageSpec<\/i> ?<i>options<\/i>? ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>image<\/i> element factory creates a new element in the current theme whose visual appearance is determined by Tk images. <i>imageSpec<\/i> is a list of one or more elements. The first element is the default image name. The rest of the list is a sequence of <i>statespec \/ value<\/i> pairs specifying other images to use when the element is in a particular state or combination of states.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Valid <i>options<\/i> are: <b><br \/> \u2212border<\/b> <i>padding<\/i><\/p>\n<p style=\"margin-left:22%;\"><i>padding<\/i> is a list of up to four integers, specifying the left, top, right, and bottom borders, respectively. If fewer than four elements are specified, <i>bottom<\/i> defaults to <i>top<\/i>, <i>right<\/i> defaults to <i>left<\/i>, and <i>top<\/i> defaults to <i>left<\/i>. In other words, a list of three numbers specify the left, vertical, and right border; a list of two numbers specify the horizontal and the vertical border; a single number specifies the same border all the way around the element. See <b>IMAGE STRETCHING<\/b>, below.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212height<\/b> <i>height<\/i><\/p>\n<p style=\"margin-left:22%;\">Specifies a minimum height for the element. If less than zero, the base image\u2019s height is used as a default.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212padding<\/b> <i>padding<\/i><\/p>\n<p style=\"margin-left:22%;\">Specifies the element\u2019s interior padding. The padding is a list of up to four length specifications <i>left top right bottom<\/i>. If fewer than four elements are specified, <i>bottom<\/i> defaults to <i>top<\/i>, <i>right<\/i> defaults to <i>left<\/i>, and <i>top<\/i> defaults to <i>left<\/i>. In other words, a list of three numbers specify the left, vertical, and right padding; a list of two numbers specify the horizontal and the vertical padding; a single number specifies the same padding all the way around the widget. Defaults to <b>\u2212border<\/b> if not specified.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212sticky<\/b> <i>spec<\/i><\/p>\n<p style=\"margin-left:22%;\">Specifies how the image is placed within the final parcel. <i>spec<\/i> contains zero or more characters \u201cn\u201d, \u201cs\u201d, \u201cw\u201d, or \u201ce\u201d.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212width<\/b> <i>width<\/i><\/p>\n<p style=\"margin-left:22%;\">Specifies a minimum width for the element. If less than zero, the base image\u2019s width is used as a default.<\/p>\n<h2>IMAGE STRETCHING <a name=\"IMAGE STRETCHING\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">If the element\u2019s allocated parcel is larger than the image, the image will be placed in the parcel based on the <b>\u2212sticky<\/b> option. If the image needs to stretch horizontally (i.e., <b>\u2212sticky ew<\/b>) or vertically (<b>\u2212sticky ns<\/b>), subregions of the image are replicated to fill the parcel based on the <b>\u2212border<\/b> option. The <b>\u2212border<\/b> divides the image into 9 regions: four fixed corners, top and left edges (which may be tiled horizontally), left and right edges (which may be tiled vertically), and the central area (which may be tiled in both directions).<\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:22%; margin-top: 1em\">set img1 [image create photo \u2212file button.png] <br \/> set img2 [image create photo \u2212file button-pressed.png] <br \/> set img3 [image create photo \u2212file button-active.png] <br \/> style element create Button.button image  <br \/> [list $img1 pressed $img2 active $img3]  <br \/> \u2212border {2 4} \u2212sticky we<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ttk::intro(n), ttk::style(n), ttk_vsapi(n), image(n), photo(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">style, theme, appearance, pixmap theme, image<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ttk_image \u2212 Define an element based on an image <\/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,2767],"class_list":["post-6099","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-mann","tag-ttk_image"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6099","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=6099"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6099\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}