Re: comboboxentry assertion `GTK_IS_CELL_RENDERER (cell)' issue


On Wed, Nov 24, 2010 at 10:04 AM, Tadej BorovÅak <tadeboro gmail com> wrote:

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
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_text_column (0); # this line is generating the error message


Tadej BorovÅak
tadeboro gmail com
tadej borovsak gmail com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]