How to split tabs in a tab panel into two rows

334 views
Skip to first unread message

Dave

unread,
Jun 30, 2008, 3:22:44 PM6/30/08
to Google Web Toolkit
We have a GUI window for editing details data that basically has a
header section plus a tabbed panel detail section with 12 tabs. Is
there a way to have the tabs be rendered as two rows of tabs instead
of a single row. We are trying to avoid horizontal scrolling. The
problem is the required text in the tabs makes the screen too wide.

Thanks

Dave

Dave

unread,
Jul 2, 2008, 12:03:28 AM7/2/08
to Google Web Toolkit
I was able to help it some by using the extra boolean parameter to
tell the TabPanel that the text was HTML. I then inserted some HTML br
tags into the text to make the tabs do a linefeed between words. This
made the width of the tabs smaller.

Dave

kirti

unread,
Jul 25, 2008, 6:55:46 AM7/25/08
to Google Web Toolkit
hi,
can you please share the code for implementing this functionality?
regards
kirti
> > Dave- Hide quoted text -
>
> - Show quoted text -

MN

unread,
Jul 28, 2008, 7:39:05 AM7/28/08
to Google Web Toolkit

MN

unread,
Jul 28, 2008, 7:42:33 AM7/28/08
to Google Web Toolkit
the best would be, if the TabBar widget would not base on
HorizontalPanel. a FlowPanel would be better so if it on the end of
space then it flow to the next row.

but i think it is not possibel to change this. only solution: copy the
whole TabBar and TabPanel to your own TabFlowBar and TabFlowPanel and
replace the panel = new HorizontalPanel() with the flowpanel.

Dave

unread,
Jul 28, 2008, 9:06:00 AM7/28/08
to Google Web Toolkit
What I did was insert extra <BR/> tags into my text labels. It did not
split the tabs into two rows. Instead it split the text in the tabs
into two rows which enabled my GUI to fit horizontally.

Dave

nuno

unread,
Aug 12, 2008, 8:16:54 AM8/12/08
to Google Web Toolkit
Dave,

You could in CSS set white-space: normal;
That way you can write normal text without worrying about formating.

Nuno

On Jul 28, 2:06 pm, Dave <bo...@widomaker.com> wrote:
> What I did was insert extra <BR/> tags into my text labels. It did not
> split thetabsinto two rows. Instead it split the text in thetabs

karmela

unread,
Aug 13, 2008, 11:51:43 AM8/13/08
to Google Web Toolkit
nuno,
I have tried using white-space: normal, but it doesn't work because it
has inline style and it gets overwritten.
this is what i have in my CSS:
.gwt-Label
{
white-space: normal;
}

could you please tell me to I can get this to work?

Thanks,
Karmela

Dave

unread,
Aug 13, 2008, 12:56:23 PM8/13/08
to Google Web Toolkit
I added the <BR/> markup to the text and passed in TRUE for the HTML
flag on the API telling it that the TAB contained HTML content.

Dave

karmela

unread,
Aug 13, 2008, 3:09:34 PM8/13/08
to Google Web Toolkit
Dave,
In-order to use the white-space, I have to do the following:
.gwt-TabBarItem .gwt-Label
{
white-space: normal !important;
}

this works, but the problem is that the tabs are still too long for
the page.
I want the tabs to resize depending on the screen size.

Any suggestions?

Thanks,
Karmela

karmela

unread,
Aug 14, 2008, 10:00:28 AM8/14/08
to Google Web Toolkit
I figured it out :)
I had to set the width of .gwt-TabBarItem-wrapper and .gwt-TabBarItem;
I also had take out the padding from .gwt-TabBar .gwt-TabBarItem.



Karmela
Reply all
Reply to author
Forward
0 new messages