Re: GtkListStore -- add columns at run time.
Tristan Van Berkom <[email protected]> Thu, 30 May 2013 17:10:33 +0900
| Newsgroups | gmane.comp.gnome.glade.user |
|---|---|
| Message-ID | <CAGUy9WJvmqa-GwfxRQuRFRwtJA9jYJBCCbWK=s_1C7N+RMHSxQ@mail.gmail.com> |
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
_______________________________________________
Glade-users maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/glade-users