gtk2-perl tree signals



Hi,

i've got some trouble with the tree_simple.pl example.
I tried to add a signal event, but this doesn't work:

foreach (@children) {
    $tree_model->append($iter, $parents_iterators{$_->{parent}});
    $tree_model->set($iter, [ 0 => $_->{value} ]);
    $iter->signal_connect('select', sub { print "item selected\n" });
}

I found something of Gtk2::TreeSelection, but any example how to get it 
working. Is there any example out there?

I found that there is TreeItem also. What's the difference to TreeIter?

Thanks, Jens



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