[Glade-users] Re: Destroy and rebuild a treeview widget

Ruch Guillaume wrote:


Can somebody tell me what's the function to display a new widget in a
container? I finally managed to build my dynamic tree (thanks
Tristan ;) ) but It still displays nothing... I tried to use
gtk_container remove/add but it didnt change anything... Got an idea?
I think it'd work if i destroy.rebuild the whole window but maybe
there's another way...


You must call gtk_widget_show() on widgets that you want to be visible
(or set the visible property to true in glade)... or call 
on some parent in the heirarchy (that may be the problem).


 liststore=gtk_list_store_newv (cols, types);

 g_free (types);


Hmmm seems that you are leaking the liststore every time, unreffing
it here should pass ownership of the model to the treeview... so that
next time you set the model the last model will be finalized.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]