1ttk::combobox(n) Tk Themed Widget ttk::combobox(n)
2
3
4
5______________________________________________________________________________
6
8 ttk::combobox - text field with popdown selection list
9
11 ttk::combobox pathName ?options?
12______________________________________________________________________________
13
15 A ttk::combobox combines a text field with a pop-down list of values;
16 the user may select the value of the text field from among the values
17 in the list.
18
20 -class -cursor -takefocus
21 -style
22
23 See the ttk_widget manual entry for details on the standard options.
24
26 Command-Line Name:-exportselection
27 Database Name: exportSelection
28 Database Class: ExportSelection
29
30 Boolean value. If set, the widget selection is linked to the X
31 selection.
32
33 Command-Line Name:-justify
34 Database Name: justify
35 Database Class: Justify
36
37 Specifies how the text is aligned within the widget. Must be
38 one of left, center, or right.
39
40 Command-Line Name:-height
41 Database Name: height
42 Database Class: Height
43
44 Specifies the height of the pop-down listbox, in rows.
45
46 Command-Line Name:-postcommand
47 Database Name: postCommand
48 Database Class: PostCommand
49
50 A Tcl script to evaluate immediately before displaying the list‐
51 box. The -postcommand script may specify the -values to dis‐
52 play.
53
54 Command-Line Name:-state
55 Database Name: state
56 Database Class: State
57
58 One of normal, readonly, or disabled. In the readonly state,
59 the value may not be edited directly, and the user can only
60 select one of the -values from the dropdown list. In the normal
61 state, the text field is directly editable. In the disabled
62 state, no interaction is possible.
63
64 Command-Line Name:-textvariable
65 Database Name: textVariable
66 Database Class: TextVariable
67
68 Specifies the name of a global variable whose value is linked to
69 the widget value. Whenever the variable changes value the wid‐
70 get value is updated, and vice versa.
71
72 Command-Line Name:-values
73 Database Name: values
74 Database Class: Values
75
76 Specifies the list of values to display in the drop-down list‐
77 box.
78
79 Command-Line Name:-width
80 Database Name: width
81 Database Class: Width
82
83 Specifies an integer value indicating the desired width of the
84 entry window, in average-size characters of the widget's font.
85
87 The following subcommands are possible for combobox widgets:
88
89 pathName current ?newIndex?
90 If newIndex is supplied, sets the combobox value to the element
91 at position newIndex in the list of -values. Otherwise, returns
92 the index of the current value in the list of -values or -1 if
93 the current value does not appear in the list.
94
95 pathName get
96 Returns the current value of the combobox.
97
98 pathName set value
99 Sets the value of the combobox to value.
100
101 The combobox widget also supports the following ttk::entry widget sub‐
102 commands (see ttk::entry(n) for details):
103
104 bbox delete icursor
105 index insert selection
106 xview
107
108 The combobox widget also supports the following generic ttk::widget
109 widget subcommands (see ttk::widget(n) for details):
110
111 cget configure identify
112 instate state
113
114
116 The combobox widget generates a <<ComboboxSelected>> virtual event when
117 the user selects an element from the list of values. If the selection
118 action unposts the listbox, this event is delivered after the listbox
119 is unposted.
120
122 ttk::widget(n), ttk::entry(n)
123
125 choice, entry, list box, text box, widget
126
127
128
129Tk 8.5 ttk::combobox(n)