Re: comboboxentry assertion `GTK_IS_CELL_RENDERER (cell)' issue
- From: Tadej BorovÅak <tadeboro gmail com>
- To: haratron <haratron gmail com>
- Cc: gtk-perl-list gnome org
- Subject: Re: comboboxentry assertion `GTK_IS_CELL_RENDERER (cell)' issue
- Date: Wed, 24 Nov 2010 09:04:53 +0100
Hi.
You're mixing simple, text-only version API of GtkCOmboBoxEntry with
complex one. Since you only need to show text, simple method should do
for you, but unfortunately, you cannot construct that type of combo
box using glade.
When dealing with GtkComboBoxEntry, you need to keep in mind that
there is always one GtkCellRendererText present. I fixed your code
that should work for you:
$color_centry1= $builder->get_object('comboboxentry1');
my $model3 = new Gtk2::ListStore('Glib::String');
my @listing_centry1 = qw/red blue purple yellow black/;
foreach $text (@listing_centry1) {
 Âmy $iter = $model3->append ();
$model3->set ($iter, 0, $text);
}
$color_centry1->set_model($model3);
$color_centry1->set_text_column (0); # this line is generating the error message
$color_centry1->set_active(0);
Cheers,
Tadej
--
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]