Rohit,
Have you looked at the AS3 TextField numLines property and the TextField getLineText(index) method? Regards, -Keith http://keithreinfeld.home.comcast.net <http://keithreinfeld.home.comcast.net/> _____ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of rohit_sharma1982 Sent: Friday, May 15, 2009 6:50 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to detect when word wrap has occurred? Hi, I am facing the following problem and am not being able to solve it. In my chat application I have to show my message in the text area as following:- message:sender If the message consists of single line everything works fine. For a message which exceeds the width of the text area component, I want it to be shown like this :- <part of message....> : sender <remaining message..> I was thinking if I could get the width of the text after which word wrap will occur and then check my incoming messages against that width. I was trying to use the mx_internal namespace and then use textfield. Or if I can detect the word wrap event and find out when the breaking is happening? Please help. Thanks, Rohit