RE: gtk_text_insert - begineer



Since text1 isn't a global variable, you have to first find the text widget
within your function:


void on_button1_clicked..
{
        GtkWidget *text1 = lookup_widget(window, "text1");
        gtk_text_insert(GTK_TEXT(text1)......

}

where window is the name of the toplevel object you created in glade.  You
can usually see it in main.c as

window = create_window();



-----Original Message-----
From: gtk-app-devel-list-admin gnome org
[mailto:gtk-app-devel-list-admin gnome org]On Behalf Of Petr Hracek
Sent: Wednesday, September 18, 2002 5:09 AM
To: gtk-app-devel-list gnome org
Cc: Marek Salaquarda
Subject: gtk_text_insert - begineer


Hello all

Firstly I am begineer with developing GTK+ and I using Glade and Anjuta.
I have got simple problem.
If I develop new application, I create GUI with Glade and all is OK.
I have got button1 widget there and text1 widget there.
If I insert signal on_button1_clicked I want after this click insert to the
text box some text,
but compiler says me that text1 widget is undeclared symbol.

void on_button1_clicked ...
{
        gtk_text_insert(GTK_TEXT(text1),NULL,NULL,NULL,"some text",-1);
}

Can you help me with problems, where I wrote code.
Can you send me emails to my address and to the conference.

Thank you very much
Petr

_______________________________________________
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]