1ttk::combobox(n)               Tk Themed Widget               ttk::combobox(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       ttk::combobox - text field with popdown selection list
9

SYNOPSIS

11       ttk::combobox pathName ?options?
12_________________________________________________________________
13

DESCRIPTION

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

STANDARD OPTIONS

20       -class                -cursor              -takefocus
21       -style
22
23       See the ttk_widget manual entry for details on the standard options.
24

WIDGET-SPECIFIC OPTIONS

26       [-exportselection exportSelection]  Boolean  value.  If set, the widget
27       selection is linked to the X selection.   [-justify justify]  Specifies
28       how  the  text  is  aligned within the widget.  One of left, center, or
29       right.  [-height height] Specifies the height of the pop-down  listbox,
30       in  rows.   [-postcommand postCommand] A Tcl script to evaluate immedi‐
31       ately before displaying the listbox.  The -postcommand script may spec‐
32       ify the -values to display.  [-state state] One of normal, readonly, or
33       disabled.  In the readonly state, the value may not be edited directly,
34       and the user can only select one of the -values from the dropdown list.
35       In the normal state, the text field is directly editable.  In the  dis‐
36       abled  state, no interaction is possible.  [-textvariable textVariable]
37       Specifies the name of a variable whose value is linked  to  the  widget
38       value.   Whenever  the  variable  changes  value  the  widget  value is
39       updated, and vice versa.  [-values values] Specifies the list of values
40       to display in the drop-down listbox.  [-width width] Specifies an inte‐
41       ger value indicating the desired width of the entry window, in average-
42       size characters of the widget's font.
43

WIDGET COMMAND

45       pathName cget option
46              Returns   the  current  value  of  the  specified  option.   See
47              ttk::widget(n).
48
49       pathName configure ?option? ?value option value ...?
50              Modify or query widget options.  See ttk::widget(n).
51
52       pathName current ?newIndex?
53              If newIndex is supplied, sets the combobox value to the  element
54              at position newIndex in the list of -values.  Otherwise, returns
55              the index of the current value in the list of -values or  -1  if
56              the current value does not appear in the list.
57
58       pathName get
59              Returns the current value of the combobox.
60
61       pathName identify x y
62              Returns the name of the element at position x, y.  See ttk::wid‐
63              get(n).
64
65       pathName instate stateSpec ?script?
66              Test the widget state.  See ttk::widget(n).
67
68       pathName set value
69              Sets the value of the combobox to value.
70
71       pathName state ?stateSpec?
72              Modify or query the widget state.  See ttk::widget(n).
73
74       The combobox widget also supports the following ttk::entry widget  com‐
75       mands          (see         ttk::entry(n)         for         details):
76       bbox                  delete               icursor
77       index                 insert               selection xview
78

VIRTUAL EVENTS

80       The combobox widget generates a <<ComboboxSelected>> virtual event when
81       the user selects an element from the list of values.  If the  selection
82       action  unposts  the listbox, this event is delivered after the listbox
83       is unposted.
84

SEE ALSO

86       ttk::widget(n), ttk::entry(n)
87

KEYWORDS

89       choice, entry, list box, text box, widget
90
91
92
93Tk                                    8.5                     ttk::combobox(n)
Impressum