Search code examples
gwtgwt2uibindergwt-platform

How to build a GWT Drop Down Menu Bar in absolute positioned parent panel?


I have a GWT application with a header and a content. The header is an absolute positioned

HorizontalPanel

the content is also a

HorizontalPanel

which is positioned absolute.

How can you get a drop down menu in the header which will not be bounded by the height of the header panel, i.e., positioned absolute?


Solution

  • The easiest way to get going would probably be to use a PopupPanel and place your menu contents within. If you want to achieve an animated drop down motion you might for instance use a DisclosurePanel as the main container within your popup.

    You can set the PopupPanel's coordinates on where it should open before displaying it. You can edit the styles to make it look like your own menu.

    Have a look at the GWT showcase for example use of these.