Hi You might want to use G_OBJECT_TYPE() or G_OBJECT_TYPE_NAME() take care that the appriopriate get_type() function is called else the type won't be found.
GType button_type; gtk_button_get_type() button_type = g_type_from_name("GtkButton"); g_object_new(button_type, "label", "my button", NULL); Bests, Joël On Sun, Sep 11, 2016 at 3:30 PM, Richard Shann <rich...@rshann.plus.com> wrote: > >> On Fri, Sep 9, 2016 at 9:14 AM Thomas R?nshof <t...@kyborg.dk> wrote: >> >> > Hi, >> > >> > We are converting some OLD COBOL applications to GTK. >> > The XML is created dynamically from SCREEN SECTIONS and we then use >> > gtk_builder to get the objects into the program. >> > >> > Is there a way to get the objecttype ? >> > If it's a gtk-combo we do this, if it's a gtk-entry we do that in the >> > program and so on... > > In GNU-Denemo I use > > g_type_name (G_TYPE_FROM_INSTANCE (widget)) > > Richard Shann > > > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list