![]() |
![]()
| ![]() |
![]()
NAMEttk::combobox - text field with popdown selection list SYNOPSISttk::combobox pathName ?options? DESCRIPTIONA ttk::combobox 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. STANDARD OPTIONS-class -cursor -takefocus -style See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONSCommand-Line Name: -exportselection Database Name: exportSelection Database Class: ExportSelection
Command-Line Name: -justify Database Name: justify Database Class: Justify
Command-Line Name: -height Database Name: height Database Class: Height
Command-Line Name: -postcommand Database Name: postCommand Database Class: PostCommand
Command-Line Name: -state Database Name: state Database Class: State
Command-Line Name: -textvariable Database Name: textVariable Database Class: TextVariable
Command-Line Name: -values Database Name: values Database Class: Values
Command-Line Name: -width Database Name: width Database Class: Width
WIDGET COMMANDThe following subcommands are possible for combobox widgets:
The combobox widget also supports the following ttk::entry widget subcommands (see ttk::entry(n) for details): bbox delete icursor index insert selection xview The combobox widget also supports the following generic ttk::widget widget subcommands (see ttk::widget(n) for details): cget configure identify instate state VIRTUAL EVENTSThe combobox widget generates a <<ComboboxSelected>> 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. STYLING OPTIONSThe class name for a ttk::combobox is TCombobox. The ttk::combobox uses the entry and listbox widgets internally. The listbox frame has a class name of ComboboxPopdownFrame. Dynamic states: disabled, focus, pressed, readonly. TCombobox styling options configurable with ttk::style are: -arrowcolor color
Can only be changed when using non-native and
non-graphical themes.
-insertwidth amount
-lightcolor color -padding padding -postoffset padding -selectbackground color Text entry select background.
-selectforeground color
Text entry select foreground.
The ttk::combobox popdown listbox cannot be configured using ttk::style nor via the widget configure command. The listbox can be configured using the option database. option add *TCombobox*Listbox.background color
To configure a specific listbox (subject to future change): set popdown [ttk::combobox::PopdownWindow .mycombobox] $popdown.f.l configure -font font ComboboxPopdownFrame styling options configurable with ttk::style are: -borderwidth amount
Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. SEE ALSOttk::widget(n), ttk::entry(n) KEYWORDSchoice, entry, list box, text box, widget
|