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.  here's
a short description:
create big_widget()
 <make the widget>
gtk_signal_connect (GTK_OBJECT (big_widget), "realize",
                     GTK_SIGNAL_FUNC (on_big_widget_realize),
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, but
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.

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