0

I have created the TabLayoutPanel. If its

.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabInner

CSS Class is modified with padding, say padding: 15px; or font-size: 25px;

then, the tabs hide with in the browser window. What is the reason and how to fix this?

Thanks, Bennet.

Onkar
  • 652
  • 3
  • 15
Bennet
  • 387
  • 1
  • 6
  • 13

2 Answers2

0

Just a guess (without seeing any code) but I bet you haven't added your TabLayoutPanel properly. The "Layout" panels are great but you you have to play by the rules.

Make sure that you have an unbroken link of "layout" type panels all the way down to the "RootLayoutPanel".

Also, verify that you are in fact using the "RootLayoutPanel" and NOT the "RootPanel" to add your gwt widget to the dom

RootLayoutPanel.get().add(myTabLayoutPanel);

See here, specifically the section titled "RequiresResize" and "ProvidesResize" http://www.gwtproject.org/doc/latest/DevGuideUiPanels.html#LayoutPanels

0

.gwt-TabLayoutPanelTabInner is the wrapper around the label displayed in the actual tab. When you try to increase the padding (say padding : 'z'px;)what happens is it pushes the label by 'z' pixels from all sides and it eventually hides behind the enclosing div or the .gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs. As a solution you can either adjust the padding so that it doesn't hide behind the parent div or increase the size of parent so as to allow the tabs take more padding.

Onkar
  • 652
  • 3
  • 15
  • What you said is good idea. I fixed it by increasing the bar height. I am sorry, in this I couldn't understand "increase the size of parent", what is this mean? I am using uibinders with gwtp, how do I add this layout panel to rootlayout panel. please help me foe this. – Bennet Feb 05 '14 at 09:25
  • Increase enclosing parent height is something I should have said I guess..I am not that familiar with gwtp I will investigate more but you can always enclose your ui binder in a layout panel instead of the default htmlpanel and then add to root layout panel as suggested in the other answer – Onkar Feb 05 '14 at 17:37