[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-general
Subject:    [PHP-GTK] solved: How to read from a GtkCTreeNode?
From:       "Sebastian G." <mailseppel () gmx ! de>
Date:       2002-02-25 12:05:42
[Download RAW message or body]

> > Sebastian G. wrote:
> > [...]
> > How do I read the data out of a GtkCTreeNode? All I want is to display
> > informations on a selected GtkCTree-row in my status-bar. But I'll at
> > least need _one_ column-data out of that row. I know how to specify the
> > GtkCTreeNode selected, but no further...

> Steph wrote:
> [...]
> I found it impossible to get text, error messages all over the shop, so in the end \
> I used the row number and get_pixtext() - the first array member in that return is \
> text.

Hi,

thanks once again.
I've been solving the problem the following way:
> $ctree -> node_set_row_data($sibling, array($the_id =>
$the_text_to_show));

And the function reading a selected row:
> function list_change($ctree) {
> 	global	$ctree_data;
> 	
> 	$ctree -> freeze();
> 	
> 	$node = $ctree -> node_get_row_data($ctree -> selection[0]);
> 	$the_id = key($node);
> 	$the_text_to_show = $node[$the_id];
> 	
> 	$ctree -> thaw();
> }

Cool, I feel happy, I don't believe it...!

-- MfG, Sebastian G. <: mailseppel@gmx.de :.germany-HH>

-- 
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic