Friday, February 28, 2014

How to align Center the Component inside a Tab of a TabLayoutPanel in UiBinder (GWT)?

in ui.xml

<g:TabLayoutPanel barUnit='EM' barHeight='3'>    <g:tab>      <g:header size='7'><b>Income</b></g:header>      <g:Label>Income</g:Label>    </g:tab>    <g:tab width="100%">      <g:header size='7'><b>Cost</b></g:header>      <g:HTMLPanel ui:field="costHTMLPanel" addStyleNames="{style.alignCenter}" />    </g:tab>    </g:TabLayoutPanel>  

myResource.css file

.alignCenter{      align:center;  }  

I put width="100%" into tab <g:tab width="100%"> but it didn't work.

I also tried <g:HTMLPanel ui:field="costHTMLPanel" addStyleNames="{style.alignCenter}" width="100%" /> but it also didn't work

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment