Re: Need clarification about gtk_widget_set_events()



DC A wrote:

Hello! Can anyone kindly clarify when to use gtk_widget_set_events() routine? I know every widget has some default events. But how can we be sure which events are automatically selected by widgets and we don't need to call the above mentioned routine? Thanks.

You probably want to use gtk_widget_add_events() so as to leave the
widget's default event mask in tact, you want to call it before the widget is realized.

when a widget is gtk_widget_show()'n inside a heirarchy with a visible toplevel (this is called and "anchored" child widget) and you return to the GTK+ mainloop;
the widget will finally be realized.

its safe to call directly after creating the widget before showing it.

Cheers,
                              -Tristan




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