Gtk2::C...BoxEntry(3)
π 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 π«Ά
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 fromperl v5.42.0and it's dated2025-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
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms