Re: GtkComboBox events



Did you do

gtk_widget_set_events(control->control, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK);

?

Greg Breland wrote:

I'm trying to hook up the enter-notify, leave-notify, focus-in and
focus-out events to a GtkComboBox and having no luck.  I'm using the
same code that works fine for my GtkEntry, GtkButton and GtkCheckButton
widgets.

I would think since the ComboBox is derived from a GtkWidget it would
emit all the GtkWidget signals or is this incorrect?  The one native
event for the ComboBox, "changed" works just fine.  Here is the code I'm
using:

g_signal_connect (G_OBJECT(control->control), "enter-notify-event", G_CALLBACK (mouse_enter_event), (gpointer)control); g_signal_connect (G_OBJECT(control->control), "leave-notify-event", G_CALLBACK (mouse_leave_event), (gpointer)control); g_signal_connect (G_OBJECT(control->control), "focus-in-event", G_CALLBACK (control_gainfocus_event),
                 (gpointer)control);
g_signal_connect (G_OBJECT(control->control), "focus-out-event", G_CALLBACK (control_lostfocus_event),
                (gpointer)control);

/* This event works fine */
g_signal_connect (control->control, "changed", G_CALLBACK (combo_change_event), (gpointer)control);


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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