class GTK::V3::Gtk::GtkComboBox

unit class GTK::V3::Gtk::GtkComboBox;
also is GTK::V3::Gtk::GtkBin;

GtkComboBox — A widget used to choose from a list of items

Synopsis

# Get a fully designed combobox
my GTK::V3::Gtk::GtkComboBox $server-cb .= new(:build-id<serverComboBox>);
my Str $server = $server-cb.get-active-id;

Methods

[gtk_combo_box_] get_active

method gtk_combo_box_get_active ( --> int32 )

Returns the index of the currently active item, or -1 if there’s no active item. See also gnome developer docs.

[gtk_combo_box_] set_active

method gtk_combo_box_set_active ( int32 $index )

Sets the active item of combo_box to be the item at index. See also gnome developer docs.

[gtk_combo_box_] get_active_id

method gtk_combo_box_get_active_id ( --> Str )

Returns the ID of the active row of combo_box. See also gnome developer docs.

[gtk_combo_box_] set_active_id

method gtk_combo_box_set_active_id ( Str $active_id )

Changes the active row of combo_box. See also gnome developer docs.

new

multi submethod BUILD ( :$widget! )

Create a combobox using a native object from elsewhere. See also Gtk::V3::Glib::GObject.

multi submethod BUILD ( Str :$build-id! )

Create a combobox using a native object from a builder. See also Gtk::V3::Glib::GObject.