Warnings in my code :-Gtk-CRITICAL **: gtk_widget_set_events: assertion `!GTK_WIDGET_REALIZED (widget)' failed



i am trying to make a custom control and i am
attaching "expose_event" and "button_press_event" on
my button in the array of buttons.
My Program is Working Properly but i am getting the
following warning. plz tell me any hint or reason..
thx 

/////////////////////////My Code////////////
g_signal_connect (G_OBJECT (Button[j][i]),
"expose_event",G_CALLBACK
(bkButtonSetup::expose_event), NULL);
g_signal_connect (G_OBJECT (Button[j][i]),
"button_press_event",G_CALLBACK (button_press_event),
NULL);
gtk_widget_set_events (Button[j][i],
GDK_EXPOSURE_MASK|GDK_BUTTON_PRESS_MASK);
gtk_widget_show(Button[j][i]);
//////////////////////////////

////////////////////////////Warnings in my
code/////////////////////
(ali:6128): Gtk-CRITICAL **: gtk_widget_set_events:
assertion `!GTK_WIDGET_REALIZED (widget)' failed

(ali:6128): Gtk-CRITICAL **: gtk_widget_set_events:
assertion `!GTK_WIDGET_REALIZED (widget)' failed
//////////////////////////////////////////////////////////

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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