1Gtk2::ComboBoxEntry(3)User Contributed Perl DocumentationGtk2::ComboBoxEntry(3)
2
3
4
6 Gtk2::ComboBoxEntry - A text entry field with a dropdown list
7
9 # the easy way
10 $combo_box_entry = Gtk2::ComboBoxEntry->new_text;
11 foreach (qw(one two three four five)) {
12 $combo_box_entry->append_text ($_);
13 }
14
15 # or the powerful way. there always has to be at least
16 # one text column in the model, but you can have anything
17 # else in it that you want, just like Gtk2::ComboBox.
18 $combo_box_entry = Gtk2::ComboBoxEntry->new ($model, $text_index);
19
20 # to mess with with entry directly, get the child:
21 $current_text = $combo_box_entry->child->get_text;
22
24 A ComboBoxEntry is a widget that allows the user to choose from a list
25 of valid choices or enter a different value. It is very similar to a
26 ComboBox, but displays the selected value in an entry to allow modify‐
27 ing it.
28
29 The ComboBoxEntry has a Gtk2::Entry as its child. To get or set the
30 currently-displayed text, just manipulate the entry normally.
31
33 Glib::Object
34 +----Glib::InitiallyUnowned
35 +----Gtk2::Object
36 +----Gtk2::Widget
37 +----Gtk2::Container
38 +----Gtk2::Bin
39 +----Gtk2::ComboBox
40 +----Gtk2::ComboBoxEntry
41
43 Glib::Object::_Unregistered::AtkImplementorIface
44 Gtk2::CellEditable
45 Gtk2::CellLayout
46
48 $entry = Gtk2::ComboBoxEntry->new
49
50 $entry = Gtk2::ComboBoxEntry->new ($model, $text_column)
51
52 * $text_column (integer)
53 * $model (Gtk2::TreeModel)
54
55 widget = Gtk2::ComboBoxEntry->new_text
56
57 $entry = Gtk2::ComboBoxEntry->new_with_model ($model, $text_column)
58
59 * $text_column (integer)
60 * $model (Gtk2::TreeModel)
61
62 Alias for new, with two arguments.
63
64 integer = $entry_box->get_text_column
65
66 $entry_box->set_text_column ($text_column)
67
68 * $text_column (integer)
69
71 'text-column' (integer : readable / writable / private)
72 A column in the data source model to get the strings from
73
75 Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
76 Gtk2::Container, Gtk2::Bin, Gtk2::ComboBox
77
79 Copyright (C) 2003-2007 by the gtk2-perl team.
80
81 This software is licensed under the LGPL. See Gtk2 for a full notice.
82
83
84
85perl v5.8.8 2007-03-18 Gtk2::ComboBoxEntry(3)