summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkcomboboxentry.sgml
blob: b8eb4892af797a1187f9ce4ff0229fb2b230ed14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!-- ##### SECTION Title ##### -->
GtkComboBoxEntry

<!-- ##### SECTION Short_Description ##### -->
A text entry field with a dropdown list

<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkComboBoxEntry is a widget that allows the user to choose from a
list of valid choices or enter a different value. It is very similar
to a #GtkComboBox, but it displays the selected value in an entry to
allow modifying it.
</para>

<para>
In contrast to a #GtkComboBox, the underlying model of a #GtkComboBoxEntry 
must always have a text column (see gtk_combo_box_entry_set_text_column()),
and the entry will show the content of the text column in the selected row.  
To get the text from the entry, use gtk_combo_box_get_active_text().
</para>

<para>
The changed signal will be emitted while typing into a GtkComboBoxEntry, 
as well as when selecting an item from the GtkComboBoxEntry's list. Use 
gtk_combo_box_get_active() or gtk_combo_box_get_active_iter() to discover 
whether an item was actually selected from the list.
</para>

<para>
Connect to the activate signal of the GtkEntry (use gtk_bin_get_child()) 
to detect when the user actually finishes entering text.
</para>

<para>
The convenience API to construct simple text-only #GtkComboBox<!-- -->es 
can also be used with #GtkComboBoxEntry<!-- -->s which have been constructed
with gtk_combo_box_entry_new_text().
</para>

<para>
If you have special needs that go beyond a simple entry (e.g. input validation),
it is possible to replace the child entry by a different widget using
gtk_container_remove() and gtk_container_add().
</para>

<refsect2 id="GtkComboBoxEntry-BUILDER-UI">
<title>GtkComboBoxEntry as GtkBuildable</title>
<para>
Beyond the &lt;attributes&gt; support that is shared by all
<link linkend="GtkCellLayout-BUILDER-UI">GtkCellLayout</link> implementation,
GtkComboBoxEntry makes the entry available in UI definitions as an internal 
child with name "entry". 
</para>
</refsect2>

<!-- ##### SECTION See_Also ##### -->
<para>
#GtkComboBox
</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### STRUCT GtkComboBoxEntry ##### -->
<para>

</para>


<!-- ##### ARG GtkComboBoxEntry:text-column ##### -->
<para>

</para>

<!-- ##### FUNCTION gtk_combo_box_entry_new ##### -->
<para>

</para>

@void: 
@Returns: 


<!-- ##### FUNCTION gtk_combo_box_entry_new_with_model ##### -->
<para>

</para>

@model: 
@text_column: 
@Returns: 


<!-- ##### FUNCTION gtk_combo_box_entry_new_text ##### -->
<para>

</para>

@void: 
@Returns: 


<!-- ##### FUNCTION gtk_combo_box_entry_set_text_column ##### -->
<para>

</para>

@entry_box: 
@text_column: 


<!-- ##### FUNCTION gtk_combo_box_entry_get_text_column ##### -->
<para>

</para>

@entry_box: 
@Returns: