1 Reply Latest reply on Nov 3, 2008 4:08 AM by SujitG

    Progress bar - Item renderer

    orange_m
      Hi all,
      I have a item renderer for a list control. Each item contain progress bar, which is static, initialized with data from DB.

      For example:
      Item #1 Usage: 74%
      Item #2 Usage: 32%
      ..
      etc.

      This is how it looks like:
      <mx:Script>
      <![CDATA[
      private function init_progress_bar():void
      {
      progressBar.setProgress(data.usage, 100);
      }
      ]]>
      </mx:Script>
      <mx:ProgressBar id="progressBar"
      mode="manual"
      labelPlacement="center"
      label="Usage %3%%"
      fontSize="9"
      barColor="haloBlue"
      trackColors="[white, haloSilver]"
      trackHeight="10"
      width="20%"
      initialize="init_progress_bar();"/>

      This is working fine if I use click event instead of initialize. But, I need this set up automatically with out any clicks or something like that.

      Does anyone see what is problem here?

      Btw. If I use explicit value in init function, that`s working fine as well.

      I.e.
      progressBar.setProgress(25, 100); // working
      progressBar.setProgress(data.usage, 100); // doesn`t working (only on click event)

      Thnx