Re: Gtk::CList::selection with a Gtk::CTree



Hi ...

$ctree->signal_connect("tree_select_row", \&list_select);

sub list_select {
        my ($widget,$row,$column) = @_;

        # do stuff ...
}

----- Original Message -----
From: Raul Dias <chaos swi com br>
To: Paolo Molaro <lupus ximian com>, <gtk-perl-list gnome org>
CC: 
Subject: Re: Gtk::CList::selection with a Gtk::CTree
Date: Thu, 8 Nov 2001 18:57:48 -0300


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).

worked as a glove :)

Now there is one last issue (at least I hope to be last)  about using 
Gtk::CTree as a Gtk::CList.

Gtk::CList is actived thru the 'select_row' event  with one click, but if
Gtk::CTree is used, it needs double click.

The first click on the row is never catched. How can I catch it?

I could use get_node_position() to findout, but not as a 
callback.


Any ideas?

Raul Dias

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

-- 
Jens Luedicke
jens irs-net com



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