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.  Must be one of left, cen‐
29       ter, or right.  [-height height] Specifies the height of  the  pop-down
30       listbox,  in rows.  [-postcommand postCommand] A Tcl script to evaluate
31       immediately before displaying the listbox.  The -postcommand script may
32       specify  the  -values  to display.  [-state state] One of normal, read‐
33       only, or disabled.  In the readonly state, the value may not be  edited
34       directly,  and  the  user  can  only select one of the -values from the
35       dropdown list.  In  the  normal  state,  the  text  field  is  directly
36       editable.    In   the  disabled  state,  no  interaction  is  possible.
37       [-textvariable textVariable] Specifies the name of  a  global  variable
38       whose  value  is  linked  to  the  widget value.  Whenever the variable
39       changes value the widget value is  updated,  and  vice  versa.   [-val‐
40       ues values]  Specifies  the  list of values to display in the drop-down
41       listbox.  [-width width] Specifies  an  integer  value  indicating  the
42       desired  width  of  the entry window, in average-size characters of the
43       widget's font.
44

WIDGET COMMAND

46       The following subcommands are possible for combobox widgets:
47
48       pathName current ?newIndex?
49              If newIndex is supplied, sets the combobox value to the  element
50              at position newIndex in the list of -values.  Otherwise, returns
51              the index of the current value in the list of -values or  -1  if
52              the current value does not appear in the list.
53
54       pathName get
55              Returns the current value of the combobox.
56
57       pathName set value
58              Sets the value of the combobox to value.
59
60       The  combobox widget also supports the following ttk::entry widget sub‐
61       commands        (see        ttk::entry(n)         for         details):
62       bbox                  delete               icursor
63       index                 insert               selection xview The combobox
64       widget  also  supports the following generic ttk::widget widget subcom‐
65       mands (see ttk::widget(n) for  details):  cget                  config‐
66       ure            identify instate               state
67

VIRTUAL EVENTS

69       The combobox widget generates a <<ComboboxSelected>> virtual event when
70       the user selects an element from the list of values.  If the  selection
71       action  unposts  the listbox, this event is delivered after the listbox
72       is unposted.
73

SEE ALSO

75       ttk::widget(n), ttk::entry(n)
76

KEYWORDS

78       choice, entry, list box, text box, widget
79
80
81
82Tk                                    8.5                     ttk::combobox(n)
Impressum