Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在UiBinder(GWT)中对齐TabLayoutPanel选项卡内的组件中心?_Gwt - Fatal编程技术网

如何在UiBinder(GWT)中对齐TabLayoutPanel选项卡内的组件中心?

如何在UiBinder(GWT)中对齐TabLayoutPanel选项卡内的组件中心?,gwt,Gwt,在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:hea

在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>
我把width=100%放在标签上,但它不起作用

我也试过了,但也没用

还尝试了以下操作,但也不起作用

  <g:tab >
    <g:header size='7'><b>Cost</b></g:header>
    <g:HTMLPanel width="100%" addStyleNames="{style.alignCenter}">
        <g:HTMLPanel ui:field="costHTMLPanel"  />
    </g:HTMLPanel>

  </g:tab>

 OR
.........
     <g:HTMLPanel width="100%" >
            <g:HTMLPanel ui:field="costHTMLPanel"  addStyleNames="{style.alignCenter}"/>
     </g:HTMLPanel>
..........

OR
<g:tab width="100%" addStyleNames="{style.alignCenter}" >
应该是

text-align: center;

在CSS文件中。

没有类似align的CSS规则。有一个规则文本对齐。
text-align: center;