RE: realize callback issues

In my brief pseudocode below, 'big_widget' is the top-level widget, so I
would think the show_all statement would take care of the realization.  Your
reply does help me with a similar issue I was having with a child widget,
thank you.


-----Original Message-----
From: James Henstridge [mailto:james daa com au]
Sent: Thursday, September 05, 2002 8:28 PM
To: Clancy, Shane W.
Cc: 'gnome-devel-list gnome org'
Subject: Re: realize callback issues

Clancy, Shane W. wrote:

>i have a gnome application that uses a number of different event callbacks,
>and for some reason my gtk_widget_realize callbacks are not working.
>a short description:
>create big_widget()
>  <make the widget>
>  gtk_signal_connect (GTK_OBJECT (big_widget), "realize",
>                      GTK_SIGNAL_FUNC (on_big_widget_realize),
>                      NULL);
>  gtk_widget_show_all (big_widget);
>  return 0;
>  printf("big_widget_realize function called.\n");
>if i call a simple function before the return statement, it works.  all my
>other callbacks work.  the realize callbacks are the only ones i'm having
>issues with.  it was my understanding that when you show a widget,
>gtk_widget_realize() is called for you.  i even tried calling
>gtk_widget_realize() directly after the widget was shown, but it still
>didn't activate my callback.  i would imagine i'm doing something wrong,
>have no idea what it could be. 
>any help would be appreciated.
Your widget won't usually be realized until it is (a) shown, and (b) its 
parent gets realized.  So by induction, the widget must be packed inside 
its parent, and its parent in the grandparent, all the way up to the 
toplevel, and all the ancestors must be shown.  Does this help?


Email: james daa com au              |
WWW: | Jan 22-25   Perth, Western Australia.

gnome-devel-list mailing list
gnome-devel-list gnome org

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