How to access child object properties?
Posted
by
user1698312
on Stack Overflow
See other posts from Stack Overflow
or by user1698312
Published on 2012-09-25T19:36:06Z
Indexed on
2012/10/07
21:38 UTC
Read the original article
Hit count: 114
I'm trying to get the text property from an entry in a dialog with the following code:
GtkWidget *dialog, *entry;
gchar *text;
entry = gtk_entry_new();
dialog = create_dialog();
...
gtk_container_child_get(GTK_CONTAINER(dialog), entry, "text", text, NULL);
and i'm getting the following:
(textview:3079): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkcontainer.c:919: container class `GtkDialog' has no child property named `text'
The dialog contains a label and an entry with two buttons.
© Stack Overflow or respective owner