Thursday, July 25, 2013

Re: UIBinder - how to style tables?

Hi,

using <tr class...> for the first tr has no effect, i. e. there is no line (in designer's preview).

Magnus

------

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
 xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:p1="urn:import:com.google.gwt.user.cellview.client">

 <ui:style>
  .border-side
  {
   border-left: solid 1px black;
  }
  
  .border-bottom
  {
   border-bottom: solid 1px black;
  }  
 </ui:style>
 
 <g:HTMLPanel>

  <table width="400" border="0" cellSpacing="10" borderWidth="1">
  
   <tr class="{style.border-bottom}">
    <td width="10%">
  <g:HTML wordWrap="false"/>
    </td>
    <td>
     <g:HTML wordWrap="false" ui:field="txt_User_1" horizontalAlignment="ALIGN_CENTER">User 1</g:HTML>
    </td>
    <td>
     <g:HTML wordWrap="false" ui:field="txt_User_2" horizontalAlignment="ALIGN_CENTER">User 2</g:HTML>
    </td>
   </tr>
   
   <tr>
    <td align='right'>
     <g:HTML wordWrap="false" ui:field="lbl_Games">Games:</g:HTML>
    </td>
    <td colspan="2" align="center">
     <g:HTML wordWrap="false" ui:field="num_Games" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
   </tr>

   <tr>
    <td align='right'>
     <g:HTML wordWrap="false" ui:field="lbl_Wins">Wins:</g:HTML>
    </td>
    <td align="center">
     <g:HTML wordWrap="false" ui:field="num_Wins_1" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
    <td align="center">
     <g:HTML wordWrap="false" ui:field="num_Wins_2" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
   </tr>
   
   <tr>
    <td align='right'>
     <g:HTML wordWrap="false" ui:field="lbl_WinsMate">Wins by Mate:</g:HTML>
    </td>
    <td align="center">
     <g:HTML wordWrap="false" ui:field="num_WinsMate_1" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
    <td align="center">
     <g:HTML wordWrap="false" ui:field="num_WinsMate_2" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
   </tr>
   
   <tr>
    <td align='right'>
     <g:HTML wordWrap="false" ui:field="lbl_WinsResign">Wins by Resign:</g:HTML>
    </td>
    <td align="center">
     <g:HTML wordWrap="false" ui:field="num_WinsResign_1" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
    <td align="center">
     <g:HTML wordWrap="false" ui:field="num_WinsResign_2" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
   </tr>
   
   <tr>
    <td align='right'>
     <g:HTML wordWrap="false" ui:field="lbl_WinsExpiry">Wins by Expiry:</g:HTML>
    </td>
    <td align="center">
     <g:HTML wordWrap="false" ui:field="num_WinsExpiry_1" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
    <td align="center">
     <g:HTML wordWrap="false" ui:field="num_WinsExpiry_2" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
   </tr>
   
   <tr>
    <td align='right'>
     <g:HTML wordWrap="false" ui:field="lbl_Undecided">Undecided:</g:HTML>
    </td>
    <td colspan="2" align="center">
     <g:HTML wordWrap="false" ui:field="num_Undecided" horizontalAlignment="ALIGN_CENTER">&nbsp;</g:HTML>
    </td>
   </tr>

    
  </table>


  
  
 </g:HTMLPanel>
 
</ui:UiBinder> 

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment