Sunday, August 25, 2019

Re: TabLayoutPanel looses its CSS style when placed in a CSS- grid container

Ah, yes.  You want to call addStyleName, not setStyleName.  I think you call addStyleNames via the UIBinder.

On Tuesday, 6 August 2019 05:54:13 UTC+10, Martin Weber wrote:
Am Montag, 15. Juli 2019, 22:00:03 CEST schrieb Craig Mitchell:
> Odd that it would lose the CSS.  You could try putting in the CSS
> yourself.  You can copy it from here
> el or from the standard.css file in your project.

This did not help.
But maybe I found the real issue:
To place the TabLayoutPanel in a CSS grid container, I added a
styleName="{style.c1}" attribute to the TabLayoutPanel in the ui.xml.
Setting a styleName seems to replace the existing CSS styles completely (for a
DataGrid, this is not the case).
As a workaround, I had to wrap g:TabLayoutPanel in a <div class="{style.c1}">.

> On Thursday, 11 July 2019 20:47:32 UTC+2, Martin Weber wrote:
> > Hi,
> >
> >  I'am faced with a weird issue.
> >
> > When I place a TabLayoutPanel in a CSS grid container, the header tabs are
> > displayed as plain text.
> > No margins, coloring etc.
> > In the browser's HTML inspector, I see that the tab header elements have
> > the class attributes set tho the GWT-styles for TabLayoutPanel. But
> > somehow
> > the GWT stylesheet/ styles are missing.
> > What am I doing wrong?
> > Any suggestion to make it work?
> >
> > In contrast,  a DataGrid placed in the same CSS-grid container looks fine.
> >
> > TIA, Martin

There are only two hard problems in Computer Science: cache invalidation,
naming things, and off-by-one errors.

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment