LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   how to get widget (https://www.linuxquestions.org/questions/programming-9/how-to-get-widget-269456/)

jrafalek 12-23-2004 02:09 AM

how to get widget
 
Hi
I try to write my first program in GTK+ and I have problem with callbacks.
I generated GUI (one label "label1" and one button "guzik") with Glade and in callbacks.c try to write my own code.
When I type:

void
on_guzik_naciskany_leave (GtkButton *button,
gpointer user_data)
{
label12 = lookup_widget(GTK_WIDGET(button), "label1");
gtk_label_set_text(GTK_LABEL(label12),"buu");

}

I change button text but I want to change text on label (text area).
Is somebody know how to do it?
Thanks

santhosh.linux 03-06-2006 08:33 PM

Label change
 
Hai,
instead of giving button in lookup_widget...give your window name like this

temp_label=lookup_widget(GTK_WIDGET(window1),"label1");



ok
bye santhosh


All times are GMT -5. The time now is 07:42 AM.