[Glade-users] Probably a stuipd question

Jason J Roberts wrote:

I want to adjust a listbox on the fly. The list is part of a dialog box
created with Glade and I'm unsure of how to get access to the list
widget without changing the interface.c code. Thanks in advance for the

In the FAQ:

3.4 How do I get a pointer to a widget from within a signal handler?

Use the lookup_widget() function provided. (It can be found in support.c)

You pass it a pointer to any widget in a window, and the name of the widget
that you want to get. Usually in signal handlers you can use the first argument
to the signal handler as the first parameter to lookup_widget(), e.g.

on_button1_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
  GtkWidget *entry1;

  entry1 = lookup_widget (GTK_WIDGET (button), "entry1");



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