« Return to Thread: item renderer in ComboBox not consistent

item renderer in ComboBox not consistent

by Mic-17 :: Rate this Message:

Reply to Author | View in Thread

I thought this might work --- fine until I start scrolling when it gets totally out of wack. The trace does fire occasionally while scrolling but not consistently. Appreciate some hints. TIA,

Mic.

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" horizontalScrollPolicy="off">
        <mx:Script>
                <![CDATA[
  private function labelComplete():void{
          trace("Here");
          if(label1.text.substr(0,1) == "*"){
                        this.setStyle("backgroundColor", 0xe8e8e3);
                                }else{
                        this.setStyle("backgroundColor", 0xFFFFFF);
                                }
  }
                ]]>
        </mx:Script>
        <mx:Label id="label1" text="{data.cmplx_nm}"    creationComplete="labelComplete()"  />
</mx:VBox>

 « Return to Thread: item renderer in ComboBox not consistent