0
<g:Grid>
    <g:row>
        <g:customCell>
            <g:HTMLPanel styleName="{style.loginPrompt}">
                <div>
                    <ui:msg description="LoginPrompt">Please <b>Log In</b></ui:msg> 
               </div>                       
            </g:HTMLPanel>  
        </g:customCell>         
    </g:row> 
...

我希望我的单元格文本将在第二个单元格中,就像在 java 中一样:

Grid g = new Grid(5, 5);
g.setText(0, 1, "asdf");
4

1 回答 1

4

g:row如果你想要 5 行和 5 列,我认为你必须在 UiBinder 中使用适当数量的和g:cell(或g:customCell)来定义它们。没有等价物,setText但您可以setHTML使用 a g:cell(并且g:customCell等价于setWidget)来做等价物。

<g:Grid>
   <g:row>
      <g:customCell><!-- whatever --></g:customCell>
      <g:cell>asdf</g:cell>
<!-- continue here for 5 rows, 5 cells per row -->
于 2012-05-09T10:09:36.153 回答