Re: Gtk::CList::selection with a Gtk::CTree
- From: Paolo Molaro <lupus ximian com>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk::CList::selection with a Gtk::CTree
- Date: Tue, 6 Nov 2001 22:09:45 +0100
On 11/05/01 Raul Dias wrote:
I am using a CTree as a normal CTree or as a CList.
As CTree inherits from CList that's valid (evil, but valid ;).
Some problems I face when dealing with this kind of situation is that
some Gtk::CList methods has a Gtk::CTree equivalent, but for a slightly
different use.
This can be easely solved by forcing the Gtk::Clist method as in:
$ctree->Gtk::CList::selectable();
This has work too well so far, but I got to a situation where it does not work.
If I am using a true Gtk::CList, the selectable method returns me a array with
the selected rows, starting with 0. e.g 0 2 4 5 10 14
If I use it with Gtk::CTree I get something like: 142817224, 142817236, 142817248,
142817260 when I have the rows 0, 1, 2, 3 selected
$ctree->selection() returns nodes (of type Gtk::CTreeNode) for the
Once you have a node, you can use $ctree->get_node_position ($node)
to get the row number for use in the CList operations (but if there is
an equivalent CTree function, use that, instead).
lupus
--
-----------------------------------------------------------------
lupus debian org debian/rules
lupus ximian com Monkeys do it better
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]