Skip navigation
GuyOX4
Currently Being Moderated

Can I set an mx control property globaly for all instances of the control.

Dec 4, 2012 12:57 PM

Tags: #flex #component #actionscript_3.0 #flex4.6

Is there a way of setting the value of a variable on a control for all instances of the control in the application? 

 

For example, I have several instances of an mx:Label and I want to change the enabled property for all instances at once rather than refer to each one individually by id.

 
Replies
  • Currently Being Moderated
    Dec 4, 2012 2:27 PM   in reply to GuyOX4

    One way is to subclass Button and change its enabled getter to watch some static property.  You don’t really want to change Button itself because Buttons exist in lots of places like ScrollBars.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points