Re: Bug in GtkCTree

From: Date: Thu, 26 Dec 2002 02:21:09 +0000
Subject: Re: Bug in GtkCTree
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2816@lists.php.net to get a copy of this message
Aaron Bishell wrote:
Ive built a little program for a file/folder selection dialog. It displays all the info in a tree like form (screenshot: http://binary.gamer.net.nz/file_dialog.gif). When you double click an _expanded_ node it always returns NULL when trying to retrieve the node selected. I use this piece of code to get the node selected: $node=$this->ctree->selection[0]; try playing with connect_after, on the expand signal.. - one of the variables sent to the method might be the node that was expanded...
You can download the full program here: http://binary.gamer.net.nz/file_dialog.zip Im not sure whether this is a GTK+ bug itself of it only occurs in PHPGTK but its very annoying. Also is there a way, if I was to display the expand "crosses" that when a user clicks an expand "cross" it selects that node? I could not find a way so I had to remove them. from what I remember you connect a signal to the tree's expand callback, and just work out what node was expanded and call select on it..
It works ok, as long as you dont trigger another signal by selecting the item.. - you can end up with recursive loops...
It's been a while since I was doing this... :) but phpmole went through alot of these 'hunt the answer' situations...
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.gtk.general (#2816) next »