[Glade-users] ? on lookup widget(...)



I don't know how to use this 100%, but this is what I do to get it to 
work.  Maybe someone else could chime in to get a complete understanding.

Lets say your in a button clicked fuction. and you wanted to lookup a 
widget that was on the same window as the button.  Let let a label named 
"label99".

void
button_clicked            (GtkButton    *button,
                                    gpointer        user_data)
{
GtkWidget * example = lookup_widget (GTK_WIDGET(button), "label99");
...

know you can use 'example' to refere to the label99.  I useally use the 
same name so I don't confuse myself.

I don't know how to refere to other widdgets outside the window though. 
 I sure it can be done, but...


good luck,

-Jeff



Huang, Mike wrote:

Hello, 

Can someone help me with usage of lookup_widget(GtkWidget *widget, const
gchar *widget_name)? I don't quite understand the first parameter. Is it the
pointer to the parent widget who contains the child widget (here represented
by *widget_name) for which we want to get its pointer? And if it is, why?

Mike Huang  

_______________________________________________
Glade-users maillist  -  Glade-users ximian com
http://lists.ximian.com/mailman/listinfo/glade-users










[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]