Re: [gtk-list] Glade & configure event



Martijn Graswinckel wrote:

>
> The problem i have is: how can i set the default's for this window from
> the configure event, there must be some way of accessing the widgets it
> contains.
>
> Any help would be greatly appreciated.
>
> Martijn Graswinckel
>

  I learned this recently; look in the support.c & support.h files that Glade
makes for you, and use the
 GtkWidget *lookup_widget(GtkWidget *widget, gchar *widget_name)  function.

  Glade hooks all the children to their toplevel window, by name, as data, so
for one child to find its brothers it just  goes:

 void child_callback(GtkWidget *me)
{
   GtkWidget *mybrother;
   mybrother=lookup_widget(me,"brothers_name_goes_here");
   etc.
}

  (If you forgot what the other widgets are named, look for them in
interface.c.)

  Am I answering the right question?
  John




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