Den 24.06.2011 11:48, skrev Chris Bartlett:
It doesn't look like there is any direct support for receiving a notification once the button has been clicked, but before the menu has been opened. Adding a ButtonPressListener to the MenuButton wouldn't really be any better than listening for the windowOpened event.

(ListButton behaves in the same way)

If you *did* need notification after the click, but before the window opened, I think it would require a custom skin to override org.apache.pivot.wtk.skin.MenuButtonSkin.mouseDown(Component, Button, int, int) org.apache.pivot.wtk.skin.MenuButtonSkin.keyPressed(Component, int, KeyLocation)


Perhaps org.apache.pivot.wtk.MenuHandler needs a new configureMenuButton() method equivalent to configureContextMenu()?
A MenuHandler property could then be added to MenuButton.

I think that would be a good idea. With my current approach I sometimes end up with a menu that is rendered partly outside of the Window. Can I somehow reposition it?

I actually tried adding a MenuHandler first, but ofcourse that didn't work :)

-- Edvin

Reply via email to