actionscript 3 - Flex: How does a component know whether one of its styles got changed? -


I inherited a custom component from TextField. The component must know how any of its styles have changed through the style set in runtime. How would I do that? This is probably obvious but I could not find an appropriate method for an event or override.

style change () method

  Public Function Style Changed (StyleProp: string): Zero  

detects changes in style properties. When a style property is set, Flex changes the style (), giving it the style name to set it.

This is an advanced method you can overced when you make a subclass of UICPonnet. When you create a custom component, you can override the style change () method to check that style named style, and handle the change accordingly. This lets you override the default behavior of an existing style, or adds your own custom style properties.

If you handle style property, then your override () method of style should call invalid diskplast () method

parameter styleprop: string-style property name, Or tap If all the styles have changed for this component, then Flex causes the component's UpdateDisplayList () method to execute.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -