GWT - Best way to implement a horizontal navbar
What is the best way to implement a horizontal navbar in GWT? Using a MenuBar, a TabLayoutPanel, or coding something by hand, that is take a bunch of div
s an float them within another div? If played around using TabLayoutPanel but wasn't able to style it to 开发者_C百科fit my needs.
EDIT
Here's what I intend to do: I have a MasterPage, laid out using a DockLayoutPanel. I have a header, footer, and a content area. After login, the content are should be filled with some sort of navigation and an area showing some panel with some widgets.
The problem with MenuBar (and MenuItems) is its rendering. GWT is rendering everything regarding menus as table and bunch of s and s. This usually messes up the layout of the rest of the page since GWT 2.0+ uses s for most of the widgets.
So, until GWT comes up with the "Layout" version for the MenuBar custom solution is probably the best solution.
A horizontal MenuBar works great for us. Give each MenuItem a Command that triggers your navigation system, or just swap controls in and out of your content area directly.
A MenuBar will be more flexible than using a TabLayoutPanel, but less flexible than a bunch of custom-coded divs.
精彩评论