On Monday, July 2, 2007 2:38:11 AM UTC-5, Neeraj Upreti wrote:
Hi Orion,you are right . the default behavior is opening the menu downwards ..
but we can customize it ..Construct a class that extends MenuBar class.
Say MenuBarExtended ..
and override the following method:
void doItemAction(final MenuItem item, boolean fireCommand) .. this
method is called when any menubar is clicked ..change the following code snippet in the function according to your
need:if (vertical)
{
popup.setPopupPosition(item. getAbsoluteLeft() +
item.getOffsetWidth(),
item.getAbsoluteTop());
}
else
{
popup.setPopupPosition(item. getAbsoluteLeft(), item.getAbsoluteTop()
+ item.getOffsetHeight());
}the above snippet decides the position of the menu to be opened .. the
menu is shown with the help of a popup panel called 'popup' and its
position is set using 'setPopupPosition' which takes argument 'int
left' and 'int top'.HTH,
Neeraj
On Jul 2, 10:56 am, Orion <timons...@gmail.com> wrote:
> I'm developing an application where the menu bar is located on the
> bottom of the screen.
>
> When I click on the menu bar the menu items are displayed below the
> menu bar, outside of the screen. The MenuBar class seems to assume
> it's used on the top of the screen and I can't find a way to make it
> behave otherwise.
>
> Is there a way to display the menu items above the menu bar?
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment