1 Reply Latest reply on Jun 9, 2010 10:31 PM by BhaskerChari

    Problem in setting style at Runtime using setStyle ??

    kiran7881 Level 1

      In Most of the tutorials of FLEX i find that setting Runtime Style to the components is a problem

       

      Can anybody please let me know what are the issues if we set the style in runtime using the by calling setStyle

       

      Thanks in advnace .

        • 1. Re: Problem in setting style at Runtime using setStyle ??
          BhaskerChari Level 4

          Hi Kiran,

           

          Calling the setStyle() method can result in decreased performance. Use it only when necessary.
          You should try to apply style sheets rather than use the setStyle() method because it is computationally expensive. This method should only be used when you are changing an object's styles during run time.
          You cannot get or set style properties directly on a component as you can with other properties. Instead, you set style properties at run time by using the getStyle() and setStyle() ActionScript methods.

           

          Hope this will make things clear..

           

          Thanks,

          Bhasker Chari