Bo Forslund wrote:
> 
> Hello!
> 
> How do i use lookup_widget(). I have been searching the gtk+ FAQ.
> Is there a Glade FAQ?
> 
> I want to put text in a text box. Let's call it text2.  Shall i do
> something like this.
> 
> some_var_maybe = lookup_widget( what_to_write_here, text2 );

>From the FAQ (which is in the top source directory, or may be installed in
/usr/doc/glade if you are using an rpm or deb. Actually looking at glade.spec
it looks as if the RPM doesn't install it at present, so that should be fixed.):


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.

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

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

  ...
}

Damon



+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.

Reply via email to