2 Replies Latest reply on Sep 5, 2006 10:32 AM by davidmedifit

    Setting accordion styles

    davidmedifit Level 1
      I am trying to set accordion bar styles, and I am having a particular problem with setting the background colors (the text font color I seem to have no problem with). Can anyone offer any suggestions?

      Here is the code I already have:

      public function setButtonStyles():void {
      plansummary.getHeaderAt(0).setStyle('color', 0xAA0000);
      plansummary.getHeaderAt(1).setStyle('color', 0x00AA00);
      plansummary.getHeaderAt(1).setStyle('background', 0x00AA00);
      }

      <mx:Accordion width="100%" height="100%" id="plansummary">
      <mx:VBox label="The Plan" toolTip="how to plan">
      <mx:Label text="How to plan"/>
      </mx:VBox>
      <mx:VBox label="Stress" toolTip="box 1">
      <mx:Label text="box 1"/>
      </mx:VBox>
      <mx:VBox label="box 2">
      <mx:Label text="box 2"/>
      </mx:VBox>
      <mx:VBox label="box 3">
      <mx:Label text="box 3"/>
      </mx:VBox>

      </mx:Accordion>


      I call the function above from "creationComplete", but I've had trouble setting the background color - I tried background, and background color, but come up empty - I believe I've seen this done in other examples.

      Thanks in advance,

      David