3 Replies Latest reply on Apr 23, 2010 7:52 PM by mitpig

    may i cancel dataGroup rollOverColor property??

    mitpig

      hi there:

       

      recently, i'm trying to replace repeater by custom ItemRenderer , and use the dataGroup to contain them.

       

      but i met some problem ,  it will change background color when rollOver and rollOut

       

      can i disable the function?  i just wanna use dataGroup , i don't wanna to change background color .........~_~

       

      could anyone help me? thx~

        • 1. Re: may i cancel dataGroup rollOverColor property??
          David_F57 Level 5

          hi,

           

          if the rollover color matches the background color then you have the effect you need otherwise you have to customise the 'states' of the datagroup or item renderer

           

          <s:DataGroup id="dg" rollOverColor="{dg.getStyle('contentBackgroundColor')}">

           

          David.

          1 person found this helpful
          • 2. Re: may i cancel dataGroup rollOverColor property??
            Shongrunden Adobe Employee

            You can turn off the highlight in the renderer by setting autoDrawBackground="false", for example:

            <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark">

                <s:DataGroup>
                    <s:itemRenderer>
                        <fx:Component>
                            <s:ItemRenderer autoDrawBackground="false">
                                <s:Label text="{data}" />
                            </s:ItemRenderer>
                        </fx:Component>
                    </s:itemRenderer>
                    <s:layout>
                        <s:VerticalLayout />
                    </s:layout>
                    <s:dataProvider>
                        <s:ArrayList>
                            <fx:String>a</fx:String>
                            <fx:String>b</fx:String>
                            <fx:String>c</fx:String>
                        </s:ArrayList>
                    </s:dataProvider>
                </s:DataGroup>
               
            </s:Application>
            • 3. Re: may i cancel dataGroup rollOverColor property??
              mitpig Level 1

              thx it really helps me!

               

              thank you all ^.^