0

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?

Michael
  • 32,527
  • 49
  • 210
  • 370

1 Answers1

1

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.

filip-fku
  • 3,265
  • 1
  • 21
  • 19
  • The problem with that is, that you still have a PopupPanel. It will not feel like a real drop down, e.g., when you hover away from the Panel the Panel is still in focus. It looses the focus only after the click. Any other ideas? – Michael Jul 13 '12 at 08:39
  • 1
    You could wire a few events. For instance have a link with a MouseOverHandler that opens the PopupPanel at the right location. You can then add a MouseOutHandler on the PopupPanel itself that closes it. – filip-fku Jul 15 '12 at 23:23