0 Replies Latest reply on Aug 3, 2011 10:08 AM by lkellyv

    Help setting selected tab chromeColor at runtime

    lkellyv

      I'm trying to set the selected tab chromeColor style at runtime for a TabBar in my app.  I have the following CSS that allows me to specify a different chromeColor at compile time:

       

      .myTabBar s|ButtonBarButton:upAndSelected,

      .myTabBar s|ButtonBarButton:overAndSelected,

      .myTabBar s|ButtonBarButton:downAndSelected,

      .myTabBar s|ButtonBarButton:disabledAndSelected {

       

          chromeColor: #ff9c00;

          color: #ffffff;

          font-weight: bold;

      }

      .myTabBar {

       

          chromeColor: #0054a4;

          color: #ffffff;

          font-weight: bold;

      }

       

      If I want to change the chromeColor for the first set of styles (the selected tab), I don't know how to use getStyleDeclaration( ) to access it.  I can use getStyleDeclaration("myTabBar") to get the style for use in a setStyle( ) call for the bottom one.

       

      Any idea how to change that selected tab's chromeColor at runtime?