Tuesday, November 30, 2010

TabLayoutPanel does not listen to width

Hi all,

I'm using a tabLayoutPanel with three tabs. However, the total width
is now dynamicly created by the width of the content of the current
tab. But, my first and second tabs are not that wide, so the third tab
always hangs a bit outside of the tab. How can I set the width of the
TabLayoutPanel?

I tried several things, but I can't seem to set the width.
tabLayoutPanel.setWidth("700px");
tabLayoutPanel.setSize("700px", "500px");
tabLayoutPanel.setPixelSize(700, 500);
....with and without tabLayoutPanel.onResize();


uibinder file:
<g:FlowPanel>
<g:TabLayoutPanel ui:field="tabLayoutPanel"
barHeight="50" height="600px">
</g:TabLayoutPanel>
<g:Button ui:field="buttonAdd" text="{i18n.save}" />
</g:FlowPanel>

I'm adding the tabs in java code after binding.
tabGeneral = new FlexTable();
.....
tabLayoutPanel.add(tabGeneral, i18nGeneral.name());


I really like GWT a lot, but I must say that the ui pieces are really
quite bad. You can't use certain widgets because it's standard mode
(or not) without warnings, setting sizes and other basic stuff doesn't
always work, examples often work in java code but not in the uibinder,
etc. It would be nice if the widgets themselves were better. It feels
like temporary broken, or just beta sourcecode. If you can make such a
good java2javascript compiler, why not create proper widgets as well?

Thanks!
Niels

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment