[Glade-users] Getting widget references in callback functions

Hi all,

What's the recommended method for getting a widget reference in a callback,
where you need more than one widget?

    1/ Make widget handles global.
    2/ Put all the handles you need into a struct,
       and use the user_data to pass a pointer to
       that struct.
    3/ ...?

Can you get a widget handle by name? Perhaps this is
possible if you have a handle to a parent widget?

e.g. gtk_container_get_child( cont, "button4" );

1 & 2 are both awkward, and require changing auto-
generated files. Is there a better solution?

Nick Hynes.

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