Re: TREEVIEW GLADE REWRITE DATA

From: Date: Wed, 06 Dec 2006 12:42:01 +0000
Subject: Re: TREEVIEW GLADE REWRITE DATA
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7490@lists.php.net to get a copy of this message
On 12/5/06, AngeloP <leone@nline.it> wrote:
Hi guys! I've a problem I've spended all the day to solve it I've not found any solution at this moment: Using GtkTreeView with glade file I'm able to write data array into the grid but if I write a new data array I'm not able to "clear" previous data and the new columns are appended at the end of previous ( also if I use $model->clear() syntax ) If you see the code below and try it you can see what is the problem !!! SCENARIO: In glade file there are 2 buttons and a treeview clicking on button1 you can insert an array into treeview and then clicking button2 a new array is appended instead to overwrite I don't know where insert a clear function ... Below there is the php and the glade file "tree.glade" Have you an idea how to soleve it ?
you have 2 data models to display, so perhaps you should have : - 2 GtkTreeviews, - 2 GtkTreeModel, you shoud separate in display_tree_(1,2) : - user interface creation, - model creation, - data feeding On methods on_button_(1,2)_clicked(), you should only populate model with your data.

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