Re: CTree get_text (was RE:setting object data (how do I?))
- From: Dermot Musgrove <dermot glade perl connectfree co uk>
- To: Jim Edwards <jedwards inmet gov br>
- Cc: Paolo Molaro <lupus ximian com>, gtk-perl <gtk-perl-list gnome org>
- Subject: Re: CTree get_text (was RE:setting object data (how do I?))
- Date: Wed, 27 Jun 2001 01:19:31 +0100
Jim Edwards wrote:
[...]
I still seem to be stuck on this question. I can find the selected CTreeNode using
my $node = $ctree->selection;
but then I want to get the text from the selection
my $text = $ctree->get_text($node,0);
# I´ve also tried 1 here - which should it be?
Doesn´t seem to return anything. And how do I get the text from the parent
node?
Hi Jim,
Lupus (Gtk-Perl maintainer) suggested 5 Dec 1999:
---------------------------------
gtk_ctree_node_get_text() works only when the node is a text node.
You should use gtk_ctree_node_get_pixtext() if it's a pixtext one,
and so on.
Anyway, I added gtk_ctree_get_node_info() to the bindings.
---------------------------------
So I reckon that for col 0 (pixtext) you need:
$ctree->get_pixtext($ctree->selection, 0);
I don't know if this works for all columns - perhaps just try it.
I don't know what you get from $ctree->get_node_info($ctree->selection);
but perhaps this helps.
HTH, Dermot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]