开发者

Catch event when text of flex spark label is changed

开发者 https://www.devze.com 2023-01-19 10:25 出处:网络
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?

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));
0

精彩评论

暂无评论...
验证码 换一张
取 消