pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@gmail.com>
Subject Re: How to create menu for MenuButton dynamically
Date Fri, 24 Jun 2011 10:16:21 GMT
On 24 June 2011 17:08, Edvin Syse <edvin@sysedata.no> wrote:

>
> 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 haven't tried, but I imagine that some combination of invalidate/repaint
calls on the pop up window should do it.
Perhaps invalidate the window and repaint in the windowOpened listener,
after you have configured the menu?

Chris

Mime
View raw message