I wanted to stripe the background of rows of a table of text items
created in a Panel using TableLayout.
There may be a better way, but this a way I found to do it. The strip-
alt tag just sets a background color in my css file.

Hope it helps someone.

void stripeTableRows(Panel table) {
  ExtElement extElement = table.getBody();
  if(extElement != null) {
    Element element = extElement.getDOM();
    if(element != null) {
      NodeList<Element> elementList =
element.getElementsByTagName("tr");
      for(int i=0; i<elementList.getLength(); i++) {
        Element e = elementList.getItem(i);
        if(1 % 2 != 0) e.setClassName("stripe-alt");
      }
    }
  }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to