On Fri, 2005-06-24 at 03:11 +0300, Nikos Kouremenos wrote:
> Hello and i hope someone has some ideas to offer.
>
> the design is simple:
> I have a menu in which I have some menuitems.
> every menuitem has a hbox which holds 8 buttons
> each button has assigned the 'clicked event'
>
> the problem is that this event is never emmited! it's like the
> menuitem receives all the signals and leaves nothing for his childs.
> It is very disappointing that even with an evenbox between the
> menuitem and the hbox doesn't work
>
> I would love if someone can explain why this happens and what I can do.
gtk_menu_popup is grabbing the mouse pointer and keyboard; that's why
it is "stealing" all the events. Since gtk+ 2.7, there's a property to
disable grabbing of keyboard, but it still grabs the pointer:
2005-03-31 Michael Natterer <[EMAIL PROTECTED]>
Allow to pop up menus without grabbing the keyboard. Useful for
stuff like virtual keyboards. Fixes bug #159890
* gtk/gtk.symbols
* gtk/gtkmenushell.[ch]: added boolean property "take-focus"
and public API gtk_menu_shell_set/get_take_focus().
* gtk/gtkmenu.c (gtk_menu_popup)
(popup_grab_on_window): don't grab the keyboard if take_focus
is FALSE.
* gtk/gtkmenuitem.c (_gtk_menu_item_popup_submen): propagate the
parent menu_shell's take_focus property to the submenu which is
about to be popped up.
You might need to persuade developers to add an option to not grab
mouse. _Although_ I have a feeling that putting buttons in a menu might
not be the best GUI design in the world. But maybe it's just me :)
Regards.
>
> All I wanted to do is have a popup menu which will hold clickable items
>
> Thanks in advance,
--
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
The universe is always one step beyond logic
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/