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

Re: CellRendererToggle vs. GtkTreeView



Hi!

I found the problem..
When I created the GtkTreeViewColumn I did not assigned the 'active'
property to the proper column of the model. Oops.
Sorry for the stupid question.


On Mon, 14 Jul 2003 12:37:25 +0200
Domsodi Gergely <doome uhulinux hu> wrote:

> Hi!
> 
> I am using a GtkTreeView with a column of ToggleButtons.
> I attach the 'toggled' signal of the CellRendererToggle to a function.
> It is working properly (i see the values in the GtkTreeStore model
> alternating), but in the view the togglebutton remains empty. Here is
> my item_toggled funtion:
> 
> sub item_toggled {
>     my ($cell, $path_str, $model) = @_;
>     my $path = Gtk2::TreePath->new_from_string ($path_str);
>     my $column = 5;
>     $iter = $model->get_iter ($path);
>     my ($toggle_item) = $model->get ($iter, $column);
>     $toggle_item ^= 1;
>     debug 'setting '.$path_str.' to '.$toggle_item;
>     # set new value
>     $model->set ($iter, $column, $toggle_item);
> }
> 
> (this is almost fully from the examples)
> 
> What could be the problem?
> 
> -- 
> doome
> 
> _______________________________________________
> gtk-perl-list mailing list
> gtk-perl-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-perl-list


-- 
doome




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