Friday, September 30, 2011

Re: FlexTable border and TabPanel

Hi,

Thanks for your help.
I try run it and the tab panel is working.
For the border I see the different border fot the cell but I don't see
the any border for the row.
Do you have any idea why is that ?

BTW - how can I send a screenshot ?

Thanks

On Sep 29, 3:35 pm, Sudhakar Abraham <s.abra...@datastoregwt.com>
wrote:
> You didn't add the border property in .FlexTable-diffPrev
> and .FlexTable-diffCurr.
>
> Add your FlexTable style property in global css file. The global css
> file name should be your_Project.css  in your project  /war
> directory.  About your TabPanel problem, I send the edited  code
> segment of your existing code.
>
> S. Abrahamwww.DataStoreGwt.com
> Persist objects directly in GAE
>
> // Corrected code.
>
> public void onModuleLoad() {
>
>         TabPanel tabPanel = new TabPanel();
>         FlowPanel flowPanel = new FlowPanel();
>
>         FlexTable flexTable1 = new FlexTable();
>         flexTable1.addStyleName("FlexTable");
>
>         HTMLTable.RowFormatter rf = flexTable1.getRowFormatter();
>         for(int i = 0; i < 6; i+=2)
>         {
>                 rf.addStyleName(i, "FlexTable-PrevRow");
>                 rf.addStyleName(i+1, "FlexTable-CurrRow");
>                 flexTable1.setText(i, 0, "Text1"+i);
>                 flexTable1.setText(i, 1, "Text2"+i);
>                 flexTable1.setText(i+1, 0, "Text1"+i);
>                 flexTable1.setText(i+1, 1, "Text4"+i);
>                 flexTable1.getCellFormatter().addStyleName(i,
> 1,"FlexTable-diffPrev");
>                 flexTable1.getCellFormatter().addStyleName(i+1,
> 1,"FlexTable-diffCurr");
>         }
>
>         flowPanel.add(flexTable1);
>         tabPanel.add(flowPanel,"FlexTable");
>         tabPanel.selectTab(0);
>         tabPanel.setSize("500px", "250px");
>         tabPanel.addStyleName("table-center");
>         RootPanel.get().add(tabPanel);
>
> }
>
> // Corrected css file.
>
> .FlexTable
>  {
>   border-top: thin solid #444444;
>   border-left: thin solid #444444;
>   border-right: thin solid #111111;
>   border-bottom: thin solid #111111;
>
> }
>
> .FlexTable-PrevRow
> {
>   border-bottom: solid 1px red;
>
> }
>
> .FlexTable-CurrRow
>  {
>   border-bottom: dashed 1px blue;
>
> }
>
> .FlexTable-diffPrev
> {
>   color: blue;
>   border-bottom: solid 1px red;
>
> }
>
> .FlexTable-diffCurr
>  {
>   color:  red;
> border-bottom: solid 1px green;
>
>
>
>
>
>
>
> }

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment