Re: GtkListStore -- add columns at run time.
dE <[email protected]> Fri, 31 May 2013 09:01:22 +0530
| Newsgroups | gmane.comp.gnome.glade.user |
|---|---|
| Message-ID | <[email protected]> |
On 05/30/13 13:40, Tristan Van Berkom wrote: > GtkTreeModel columns don't really have names. > > Glade serializes names as comments in the xml, since the column > names help to define renderer attributes in the treeview editor. > > Do you really need to define the columns dynamically ? (that sounds > like a rare case, admittedly Glade's liststore data editor is one of > those cases, though, so we recreate the liststore for that editor any > time the column types change). > > If you really need to define the columns dynamically, you probably > also have to define the renderers dynamically too, if you have some > bas constant renderers, you can assign integer values for the attributes, > and just create the list store in code. > > Cheers, > -Tristan > > On Thu, May 30, 2013 at 4:02 PM, dE <[email protected]> wrote: >> The interface file has the GtkListStore and GtkTreeView widgets, but >> GtkListStore is blank, I need to populate it during runtime, i.e. add >> columns and data. >> >> gtk_list_store_set_column_types seems to do the job, but how do I give names >> to the columns? >> _______________________________________________ >> Glade-users maillist - [email protected] >> http://lists.ximian.com/mailman/listinfo/glade-users Thanks for clarifying. This program is basically a MySQL front end, so tables have to be made dynamically. I've managed to add columns to TreeView, but struggling with TreeStore (ListStore), I'm reading up on it, and in case there're problems, I'll surely ask!! Thanks for all the help! I'll make a Glade tutorial on this focusing on code integration. _______________________________________________ Glade-users maillist - [email protected] http://lists.ximian.com/mailman/listinfo/glade-users