2012-05-09 31 views
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:如何UiBinder的网格设置文本

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

回答

4

如果你想5行5列,我觉得你有使用适当数量的g:rowg:cell(或g:customCell)在UiBinder中定义它们。没有等效于setText,但可以使用g:cell(和g:customCell相当于setWidget)执行相当于setHTML的操作。

<g:Grid> 
    <g:row> 
     <g:customCell><!-- whatever --></g:customCell> 
     <g:cell>asdf</g:cell> 
<!-- continue here for 5 rows, 5 cells per row --> 
相关问题