popup/down menus for a GtkButton with leave-notify-event and leave-enter-event
- From: Aaron Lewis <the warl0ck 1989 gmail com>
- To: Gtk Devel <gtk-list gnome org>
- Subject: popup/down menus for a GtkButton with leave-notify-event and leave-enter-event
- Date: Wed, 16 Nov 2011 09:30:45 +0800
Hi,
I'm trying to use a GtkBox with a set of GtkButtons , to simulate a
GtkMenu,
So i juxtapose those buttons , adding context menus to each of them
Connect "leave-notify-event" and "enter-notify-event" to the
following functions , passing a GtkMenu as user_data , but those
events shoot too fast , and menu won't show up.
/* CODE */
gboolean on_button_leave (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
g_debug ("## BUTTON LEAVE");
gtk_menu_popdown(GTK_MENU(user_data));
}
gboolean on_button_enter (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
g_debug ("## BUTTON ENTER");
// POPUP MENU when menu is in open mode
}
Any solutions ? Thanks !
--
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E ( http://pgp.mit.edu/ )
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]