modifying text of a GtkButton
- From: Bernd Hornböck <bhornboeck grips com>
- To: GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: modifying text of a GtkButton
- Date: Tue, 06 Mar 2001 10:25:28 +0100
hi there,
I tried to modify the text of a GtkButton.
I use GLADE and libglade.
Glade uses
gtk_button_new_with_label to add
this button. I've looked into the source
gtkbutton.c of
the GTK sources.
What I can see is, that there is a GtkLabel being added
to the GTKContainer of the button:
gtk_container_add (GTK_CONTAINER (button), label_widget);
But when I try to set the text of this label like in the following example,
the compiler tells me:
h2.cc:153: `struct _GtkContainer' has no member named `label_widget'
Example:
refresh_button = (GtkButton*) glade_xml_get_widget (GladeP1->xmlfile, "button2");
GtkLabel *buttonlabel = (GTK_CONTAINER (refresh_button))->label_widget;
gtk_label_set_text ( buttonlabel, (const gchar*) "stillempty" );
Any hints ?
Thanks in advance,
Bernd
--
Hi! I'm a signature virus! Copy me into your signature file to help me spread !
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]