1 Reply Latest reply on Apr 11, 2011 12:36 PM by EvolvedDSM

    Halo Theme | s:ComboBox | style alternatingItemColors

    ilikeflex Level 1

      Hi

       

      I am using the spark components and the halo theme.

       

      When i write the folloeing code

      <s:ComboBox alternatingItemColors="[#FFFFFF,#EEEEEE]">
      <s:ArrayCollection>
      <fx:String>One</fx:String>
      <fx:String>Two</fx:String>
      <fx:String>Three</fx:String>
      <fx:String>Four</fx:String>
      <fx:String>Five</fx:String>
      </s:ArrayCollection>
      </s:ComboBox>

       

      I get the error - alternatingItemColors is only supported for spark theme.

       

      How do i set the alternatingItemColors for halo theme???

       

      Thanks
      ilikeflex

        • 1. Re: Halo Theme | s:ComboBox | style alternatingItemColors
          EvolvedDSM Level 2

          You call the style in via a css.  Works for me anyway...  here's an example

           

          File: styles.css

           

          .altcolor {
              alternatingItemColors: #FFFFFF, #EEEEEE;
          }

           

           

          File: yourComponent.mxml

           

          <fx:Style source="styles.css"/>

           

          <s:ComboBox x="9" y="9" styleName="altcolor">
                  <s:ArrayCollection>
                      <fx:String>One</fx:String>
                      <fx:String>Two</fx:String>
                      <fx:String>Three</fx:String>
                      <fx:String>Four</fx:String>
                      <fx:String>Five</fx:String>
                  </s:ArrayCollection>
              </s:ComboBox>

          1 person found this helpful