Catch event when text of flex spark label is changed
I've not found the dataChange handler for spark label, as it was for mx:Label.
Is there ability to catch cha开发者_运维知识库nging the text of spark label?
Any help will be appreciated.
There is no change event for a Label AFAIK.
You have two opportunities:
Create your own componentt wich is based on Label, overrride set text property and dispatch Change event from it (or any other event you like).
Or
If you change Label text somwhere and want some unrelated component to be notified of the change simply dispatch event on a Label control instance
var title:Label;
...
title.text = "Some text";
title.dispatchEvent(new Event(Event.CHANGE));
精彩评论