Re: Gtk3 combos
- From: Terence Ferraro <terencejferraro gmail com>
- To: Daniel Kasak <d j kasak dk gmail com>
- Cc: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: Gtk3 combos
- Date: Thu, 1 May 2014 03:24:38 -0400
Hmm, I normally run with:
my $list = Gtk3::ListStore->new(qw/Glib::Int Glib::String/);
$list->insert_with_values(0,0,0,1,"Test");
$list->insert_with_values(1,0,1,1,"Test2");
my $combo = Gtk3::ComboBox->new_with_model_and_entry($list);
$combo->set_entry_text_column(1);
Which is why I wrapped that into the no longer existent ComboBoxEntry method:
sub Gtk3::ComboBoxEntry::new
{
my ($class,$store,$index) = @_;
my $combo = Glib::Object::Introspection->invoke (
$_GTK_BASENAME, 'ComboBox', 'new_with_model_and_entry',$class, $store);
if(defined($index)) { $combo->set_entry_text_column($index); }
return($combo);
}
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]