RE: gtk_label_set_text in glade made sources
- From: martyn 2 russell bt com
- To: big_joe1008 yahoo com, gtk-app-devel-list gnome org
- Subject: RE: gtk_label_set_text in glade made sources
- Date: Tue, 2 Apr 2002 09:36:02 +0100
Assuming the "label_put_hostname_here" is a GtkWidget*, your mistake is the
"GtkLabel(...)". If it already is a GtkLabel* you don't need to put the
"GtkLabel(...)" in at all.
You would use (assuming it is defined as a GtkWidget*):
gtk_label_set_text((GtkLabel*)label_put_hostname_here,
"helloworld");
Or (preferable)
gtk_label_set_text(GTK_LABEL(label_put_hostname_here),
"helloworld");
Else (if defined as a GtkLabel*)
gtk_label_set_text(label_put_hostname_here, "helloworld");
I don't know about the VERSION problem, sorry.
Martyn
-----Original Message-----
From: Joseph Harnish [mailto:big_joe1008 yahoo com]
Sent: Tuesday, April 02, 2002 3:55 AM
To: gtk-app-devel-list gnome org
Subject: gtk_label_set_text in glade made sources
Hello,
I am a newbe GTK/Gnome developer. I have started
using Anjuta IDE. This uses GLADE for it's GUI
designer. Well I have designed my GUI and generated
my C source code from it.
What I am doing is not to complicated. I have done it
hundreds of times in MSVC++. I need to change a label
that I created earlier using GLADE.
I tried putting the line between two generated lines.
In hopes that it would change the label before it
shows the window. I have looked at the docs on
www.gnome.org and the gtk tutorials but I still don't
see what I need to do.
window1 = create_window1 ();
gtk_label_set_text(
GtkLabel(label_put_hostname_here), "BigJoe");
gtk_widget_show (window1);
I get the error:
Parse Before GtkLabel.
I get another message before that VERSION is
undeclared. Do I need to set that?
Thanks
Joe
PS. If this isn't the spot for this please push me in
the right direction.
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]