{"id":6330,"date":"2022-12-20T18:58:10","date_gmt":"2022-12-20T21:58:10","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ttkcombobox-mann\/"},"modified":"2022-12-20T18:58:10","modified_gmt":"2022-12-20T21:58:10","slug":"ttkcombobox-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ttkcombobox-mann\/","title":{"rendered":"ttk::combobox (mann)"},"content":{"rendered":"<h1 align=\"center\">ttk::combobox<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#STANDARD OPTIONS\">STANDARD OPTIONS<\/a><br \/> <a href=\"#WIDGET-SPECIFIC OPTIONS\">WIDGET-SPECIFIC OPTIONS<\/a><br \/> <a href=\"#WIDGET COMMAND\">WIDGET COMMAND<\/a><br \/> <a href=\"#VIRTUAL EVENTS\">VIRTUAL EVENTS<\/a><br \/> <a href=\"#STYLING OPTIONS\">STYLING OPTIONS<\/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::combobox \u2212 text field with popdown selection list<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ttk::combobox<\/b> <i>pathName<\/i> ?<i>options<\/i>? ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">A <b>ttk::combobox<\/b> combines a text field with a pop-down list of values; the user may select the value of the text field from among the values in the list.<\/p>\n<h2>STANDARD OPTIONS <a name=\"STANDARD OPTIONS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"23%\">\n<p><b>\u2212class<\/b><\/p>\n<\/td>\n<td width=\"32%\">\n<p><b>\u2212cursor<\/b><\/p>\n<\/td>\n<td width=\"34%\">\n<p><b>\u2212takefocus<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>\u2212style<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the <b>ttk_widget<\/b> manual entry for details on the standard options.<\/p>\n<h2>WIDGET-SPECIFIC OPTIONS <a name=\"WIDGET-SPECIFIC OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212exportselection<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>exportSelection<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>ExportSelection<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Boolean value. If set, the widget selection is linked to the X selection.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212justify<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>justify<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Justify<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Specifies how the text is aligned within the widget. Must be one of <b>left<\/b>, <b>center<\/b>, or <b>right<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212height<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>height<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Height<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Specifies the height of the pop-down listbox, in rows.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212postcommand<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>postCommand<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>PostCommand<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">A Tcl script to evaluate immediately before displaying the listbox. The <b>\u2212postcommand<\/b> script may specify the <b>\u2212values<\/b> to display.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212state<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>state<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>State<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">One of <b>normal<\/b>, <b>readonly<\/b>, or <b>disabled<\/b>. In the <b>readonly<\/b> state, the value may not be edited directly, and the user can only select one of the <b>\u2212values<\/b> from the dropdown list. In the <b>normal<\/b> state, the text field is directly editable. In the <b>disabled<\/b> state, no interaction is possible.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212textvariable<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>textVariable<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>TextVariable<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Specifies the name of a global variable whose value is linked to the widget value. Whenever the variable changes value the widget value is updated, and vice versa.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212values<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>values<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Values<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Specifies the list of values to display in the drop-down listbox.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212width<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>width<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Width<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget\u2019s font.<\/p>\n<h2>WIDGET COMMAND <a name=\"WIDGET COMMAND\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following subcommands are possible for combobox widgets: <i><br \/> pathName<\/i> <b>current<\/b> ?<i>newIndex<\/i>?<\/p>\n<p style=\"margin-left:22%;\">If <i>newIndex<\/i> is supplied, sets the combobox value to the element at position <i>newIndex<\/i> in the list of <b>\u2212values<\/b> (in addition to integers, the <b>end<\/b> index is supported and indicates the last element of the list). Otherwise, returns the index of the current value in the list of <b>\u2212values<\/b> or <b>\u22121<\/b> if the current value does not appear in the list.<\/p>\n<p style=\"margin-left:11%;\"><i>pathName<\/i> <b>get<\/b><\/p>\n<p style=\"margin-left:22%;\">Returns the current value of the combobox.<\/p>\n<p style=\"margin-left:11%;\"><i>pathName<\/i> <b>set<\/b> <i>value<\/i><\/p>\n<p style=\"margin-left:22%;\">Sets the value of the combobox to <i>value<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The combobox widget also supports the following <b>ttk::entry<\/b> widget subcommands (see <i>ttk::entry(n)<\/i> for details):<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"12%\">\n<p><b>bbox<\/b><\/p>\n<\/td>\n<td width=\"32%\">\n<p><b>delete<\/b><\/p>\n<\/td>\n<td width=\"34%\">\n<p><b>icursor<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"12%\">\n<p><b>index<\/b><\/p>\n<\/td>\n<td width=\"32%\">\n<p><b>insert<\/b><\/p>\n<\/td>\n<td width=\"34%\">\n<p><b>selection<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\"><b>xview<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The combobox widget also supports the following generic <b>ttk::widget<\/b> widget subcommands (see <i>ttk::widget(n)<\/i> for details):<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>cget configure identify<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"12%\">\n<p><b>instate<\/b><\/p>\n<\/td>\n<td width=\"32%\">\n<p><b>state<\/b><\/p>\n<\/td>\n<td width=\"34%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>VIRTUAL EVENTS <a name=\"VIRTUAL EVENTS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The combobox widget generates a <b><<ComboboxSelected>><\/b> virtual event when the user selects an element from the list of values. If the selection action unposts the listbox, this event is delivered after the listbox is unposted.<\/p>\n<h2>STYLING OPTIONS <a name=\"STYLING OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The class name for a <b>ttk::combobox<\/b> is <b>TCombobox<\/b>. The <b>ttk::combobox<\/b> uses the <b>entry<\/b> and <b>listbox<\/b> widgets internally. The listbox frame has a class name of <b>ComboboxPopdownFrame<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Dynamic states: <b>disabled<\/b>, <b>focus<\/b>, <b>pressed<\/b>, <b>readonly<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>TCombobox<\/b> styling options configurable with <b>ttk::style<\/b> are:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212arrowcolor<\/b> <i>color<\/i> <b><br \/> \u2212arrowsize<\/b> <i>amount<\/i> <b><br \/> \u2212background<\/b> <i>color<\/i> <b><br \/> \u2212bordercolor<\/b> <i>color<\/i> <b><br \/> \u2212darkcolor<\/b> <i>color<\/i> <b><br \/> \u2212focusfill<\/b> <i>color<\/i> <b><br \/> \u2212foreground<\/b> <i>color<\/i> <b><br \/> \u2212fieldbackground<\/b> <i>color<\/i><\/p>\n<p style=\"margin-left:22%;\">Can only be changed when using non-native and non-graphical themes.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212insertwidth<\/b> <i>amount<\/i> <b><br \/> \u2212lightcolor<\/b> <i>color<\/i> <b><br \/> \u2212padding<\/b> <i>padding<\/i> <b><br \/> \u2212postoffset<\/b> <i>padding<\/i> <b><br \/> \u2212selectbackground<\/b> <i>color<\/i><\/p>\n<p style=\"margin-left:22%;\">Text entry select background.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212selectforeground<\/b> <i>color<\/i><\/p>\n<p style=\"margin-left:22%;\">Text entry select foreground.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>ttk::combobox<\/b> popdown listbox cannot be configured using <b>ttk::style<\/b> nor via the widget <b>configure<\/b> command. The listbox can be configured using the option database.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">option add *TCombobox*Listbox.background <i>color<\/i> <br \/> option add *TCombobox*Listbox.font <i>font<\/i> <br \/> option add *TCombobox*Listbox.foreground <i>color<\/i> <br \/> option add *TCombobox*Listbox.selectBackground <i>color<\/i> <br \/> option add *TCombobox*Listbox.selectForeground <i>color<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To configure a specific listbox (subject to future change):<\/p>\n<p style=\"margin-left:22%;\">set popdown [ttk::combobox::PopdownWindow .mycombobox] <br \/> $popdown.f.l configure \u2212font <i>font<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ComboboxPopdownFrame<\/b> styling options configurable with <b>ttk::style<\/b> are:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212borderwidth<\/b> <i>amount<\/i> <b><br \/> \u2212relief<\/b> <i>relief<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Some options are only available for specific themes.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the <b>ttk::style<\/b> manual page for information on how to configure ttk styles.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ttk::widget(n), ttk::entry(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">choice, entry, list box, text box, widget<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ttk::combobox \u2212 text field with popdown selection list <\/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,2926],"class_list":["post-6330","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-mann","tag-ttk_combobox"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6330","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=6330"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6330\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}