Saturday, October 10, 2009

Re: How to add different css for each tab in the TabPanel

Hi, its basically just CSS, here is how you would do it directly in GWT, but I prefer separating the view from the code.

// Create a tab panel and populate with a few tabs.
    TabPanel tabPanel = new TabPanel();
    tabPanel.setPixelSize(500, 500);
    // Tab content.
    AbsolutePanel contentPanel = new AbsolutePanel();
    contentPanel.setHeight("200px");
    contentPanel.getElement().getStyle().setProperty("backgroundColor", "#AAAAFF");

    // Tab widget.
    HTML tabWidget = new HTML("Coloured Tab");
    tabWidget.setWordWrap(false);
    tabWidget.getElement().getStyle().setProperty("backgroundColor", "#AAAAFF");
    tabPanel.add(contentPanel, tabWidget);     // Add the tab panel somewhere ....     someContainer.add(tabPanel);

  - Mohamed Mansour


On Sat, Oct 10, 2009 at 6:35 AM, maheshm1206 <maheshm1206@gmail.com> wrote:

The idea is to have each tab in the TabPanel look different.
For example, the first tab bg will be gray, second tab bg will be
black etc.
Thanks in advance for the help.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate