Re: CTree get_text (was RE:setting object data (how do I?))

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
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]