1Gtk2::ComboBoxEntry(3)User Contributed Perl DocumentationGtk2::ComboBoxEntry(3)
2
3
4

NAME

6       Gtk2::ComboBoxEntry - A text entry field with a dropdown list
7

SYNOPSIS

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

DESCRIPTION

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
27       modifying 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

HIERARCHY

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

INTERFACES

43         Glib::Object::_Unregistered::AtkImplementorIface
44         Gtk2::Buildable
45         Gtk2::CellLayout
46         Gtk2::CellEditable
47

METHODS

49   $entry = Gtk2::ComboBoxEntry->new
50   $entry = Gtk2::ComboBoxEntry->new ($model, $text_column)
51       ·   $text_column (integer)
52
53       ·   $model (Gtk2::TreeModel)
54
55   widget = Gtk2::ComboBoxEntry->new_text
56       Since: gtk+ 2.4
57
58   $entry = Gtk2::ComboBoxEntry->new_with_model ($model, $text_column)
59       ·   $text_column (integer)
60
61       ·   $model (Gtk2::TreeModel)
62
63       Alias for new, with two arguments.
64
65   integer = $entry_box->get_text_column
66   $entry_box->set_text_column ($text_column)
67       ·   $text_column (integer)
68

PROPERTIES

70       'text-column' (integer : default -1 : readable / writable / private)
71           A column in the data source model to get the strings from
72

SEE ALSO

74       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
75       Gtk2::Container, Gtk2::Bin, Gtk2::ComboBox
76
78       Copyright (C) 2003-2011 by the gtk2-perl team.
79
80       This software is licensed under the LGPL.  See Gtk2 for a full notice.
81
82
83
84perl v5.30.0                      2019-07-26            Gtk2::ComboBoxEntry(3)
Impressum