Pop-up menus and mouse button events
- From: Constantine Vetoshev <con consela com>
- To: gtk-list redhat com
- Subject: Pop-up menus and mouse button events
- Date: Sun, 26 Jul 1998 13:47:20 -0400
I have a question about how pop-up menus could be made to work in
GTK+. Basically, I want to bind a pop-up menu to the third mouse
button. I want it to come up anywhere within the window of the
application. This means I have to attach a button_press_event to the
window. Then I'd have a callback that would bring up the menu.
This doesn't work because button_press_events are apparently
ignored. I wrote a small program that does nothing but spit out what
happens to it. There's nothing there that has an GdkEvent type
GDK_BUTTON_PRESS, GDK_2BUTTON_PRESS, GDK_3BUTTON_PRESS, or
GDK_BUTTON_RELEASE.
The examples directory has a menu example program that shows pop-up
menus. However, this program brings up a pop-up menu when a GtkButton is
clicked. As I said, I want the menus to come up anywhere in the window
(specifically, over a GdkImage).
Can this be done?
Regards,
Constantine Vetoshev
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]