Gtk2::C...BoxEntry(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Gtk2::ComboBoxEntry β€” a text entry field with a dropdown list πŸŽ€

(oh and btw bestie, this page lives in the User Contributed Perl Documentation section of the manual, so you know it's the good stuff ✨)


🌸 SYNOPSIS 🌸

okay so first, the easy way πŸ’…

# the easy way
$combo_box_entry = Gtk2::ComboBoxEntry->new_text;
foreach (qw(one two three four five)) {
    $combo_box_entry->append_text ($_);
}

or the powerful way. there always has to be at least one text column in the model, but you can have anything else in it that you want, just like Gtk2::ComboBox ✨

# or the powerful way.  there always has to be at least
# one text column in the model, but you can have anything
# else in it that you want, just like Gtk2::ComboBox.
$combo_box_entry = Gtk2::ComboBoxEntry->new ($model, $text_index);

and to mess with with entry directly, get the child πŸ‘‘

# to mess with with entry directly, get the child:
$current_text = $combo_box_entry->child->get_text;

πŸ¦‹ DESCRIPTION πŸ¦‹

A ComboBoxEntry is a widget that lets the user either pick from a list of valid choices or type in a whole different value. it's giving very similar to a ComboBox, except the selected value shows up inside an entry so you can actually modify it πŸ’…

The ComboBoxEntry has a Gtk2::Entry as its child. so to get or set the currently-displayed text, you just manipulate the entry normally. no cap, that's it 🫢


πŸ‘‘ HIERARCHY πŸ‘‘

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Container
                    +----Gtk2::Bin
                         +----Gtk2::ComboBox
                              +----Gtk2::ComboBoxEntry

look at that bloodline. main character energy from the very top ⭐


🌈 INTERFACES 🌈

Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable
Gtk2::CellLayout
Gtk2::CellEditable

✨ METHODS ✨

πŸ’œ $entry = Gtk2::ComboBoxEntry->new

πŸ’œ $entry = Gtk2::ComboBoxEntry->new ($model, $text_column)

  • $text_column (integer) β€” which column, as a number πŸ“
  • $model (Gtk2::TreeModel) β€” the model, bestie 🌸

πŸ’œ widget = Gtk2::ComboBoxEntry->new_text

Since: gtk+ 2.4 πŸŽ€

πŸ’œ $entry = Gtk2::ComboBoxEntry->new_with_model ($model, $text_column)

  • $text_column (integer) β€” the column index, yes ma'am πŸ’…
  • $model (Gtk2::TreeModel) β€” your model πŸ¦‹

Alias for new, with two arguments. same vibe, different name ✨

πŸ’œ integer = $entry_box->get_text_column

πŸ’œ $entry_box->set_text_column ($text_column)

  • $text_column (integer) β€” the column number you want it to read from πŸ”₯

πŸŽ€ PROPERTIES πŸŽ€

  • 'text-column' (integer : default -1 : readable / writable / private / static-nick / static-blurb) β€” a column in the data source model to get the strings from 🌸

πŸ’€ SEE ALSO πŸ’€

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::ComboBox


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice. πŸ“œ


and that's the whole page, bestie!! πŸ’– this one came from perl v5.42.0 and it's dated 2025-07-25 β€” so if you ever need to cite it, you know exactly where it came from πŸŽ€βœ¨ slay, go build something iconic πŸ‘‘
πŸ“¦ where this page comes from