"Marshall D. Perrin" wrote:
>
> I'm using Glade 0.5.7 to develop some control software for some
> astronomical hardware. I want to be able to change the label text on
> some buttons, after those buttons have been created. The code that glade
> generates uses gtk_new_button_with_label() to create those buttons. This
> is all well and good, but how can I later on change the text of the
> labels on those buttons? lookup_widget() will get me the button, but not
> the label inside of it, 'cause I don't know what its name is... Any
> pointers as to how I should go about doing this? Thanks.
GtkButton is a subclass of GtkBin, which is a simple container with one
child. You can access the child with:
GTK_BIN (button)->child
So if you know the child is a label you can do:
gtk_label_set_text (GTK_LABEL (GTK_BIN (button)->child), "Hello");
Damon
+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.