Re: Trees

From: Date: Sat, 08 Mar 2003 02:27:14 +0000
Subject: Re: Trees
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-3081@lists.php.net to get a copy of this message
have a look at this. http://docs.akbkhome.com/phpmole/module_class_browser.html#_insert_node $ctree->node_set_row_data($node, array(.....)) Regards Alan Andrew Smith wrote:
Hi GtkTree is quite limited, lacking features like indenting, recursive deselecting etc... (unless someone can help me implement those?). GtkCTree is far more powerful, but I have still not been able to handle one major shortfall - I can't seem to assign data to a tree node. For example: <?php if (!class_exists('gtk')) { if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') dl('php_gtk.dll'); else dl('php_gtk.so'); } $window = &new GtkWindow(); $window->connect_object('destroy', array('gtk', 'main_quit')); $window->connect('delete-event', 'delete_event'); function delete_event() { return false; } $window->show(); $ctree = &new GtkCTree(1, 0, array('Tree')); $window->add($ctree); $ctree->show(); $node=$ctree->insert_node(null, null, array("Top Tree"),5, null, null, null,null, false,false); $node->set_data("id",99); Gtk::main(); ?> I get: Fatal error: Call to undefined function: set_data() in C:\gtk\ctree.php on line 24 I need to assign data to that node, so that later when someone clicks on the node I can identify which item they have clicked on. Any suggestions? Thanks! -------------------------------------- Andrew Smith The Blue Box Cape Town http://www.bluebox.co.za andrew@bluebox.co.za 021 683 6017 / 083 659 6106
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

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