Re: How to get the GtkTreeStore from a GtkTreeView object



Michele Bendazzoli ha scritto:

Hi all,

This is the first time I write in this list, I'm a novice with GTK library and linux development enviroment so excuse me if the questions I will ask are trivial.

I made a new libglade project with anjuta, I design my interface with glade and I'm at the point I'm able to open a source file and display it in the first page of a GtkNoteBook, where I put my GtkTextView widget. I have also placed a button on bottom of my form to populate a GtkTreeView that I put on the second page of my notebook, to represent the flow chart of the source code that I have load in the source page.

I read the manual and I see that any GtkTreeView is alway associated with a model, i.e., for me, with a GtkTreeStore. I see also that in the examples they usually firstr create GtkTreeStore and then the TreeView from the GtkTreeStore, so that one can first populate the store and then render it with the GtkTreeView.

The problem for me is this: since I don't have to create the GtkTreeView because this seems to be automatically manage by the libglade middleware (I get the GtkTreeView directly by the xml made by glade), how can I get the store associated with the TreeView so that I can insert the row that I need?

Thank you in advance for any advice

Ok, I'm distract: it seems that

gtk_tree_view_get_model is what I need ;-)

ciao, Michele




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