Hello Alina, Thanks. I looked at the code it seems that the DATA_CHANGE is for the set data, when using set text, this is "textChange"
Nicolas Le jeu. 1 oct. 2020 à 14:06, Alina Kazi <[email protected]> a écrit : > Hi, > > That is DATA_CHANGE in mx.events.FlexEvent. > > Alina Kazi > > On Thu, 1 Oct 2020, 4:58 pm tranquiliste, <[email protected]> > wrote: > >> Hello, >> >> Thanks Alina, >> I think it will be easier for me to just define a new class that extends >> mx:Label and listen to an event which indicates that the text has changed >> and then execute a simple function to redefine the text. >> just as followed >> public function changeStr():void { >> if (maxWidth) { >> if (this.measuredWidth > maxWidth) { >> this.toolTip = this.text; >> var len:int = text.length-1; >> for(var index:int = len; index > 0; index--) >> { >> this.text = this.text.substring(0,index)+"..."; >> if (this.measuredWidth < maxWidth) { >> break; >> } >> } >> } >> } >> } >> I just need to find the proper event to listen >> >> Nicolas >> >> >> >> >> ----- >> Nicolas >> -- >> Sent from: http://apache-royale-users.20374.n8.nabble.com/ >> >
