it has been a slow sunday :) this is what i came u with to remove \n
protected function activityinput_keyDownHandler(event:KeyboardEvent):void { if(event.keyCode==13){ // chatch return key down when typing activityinput.text = activityinput.text.substr(0, activityinput.text.length -1); } } <s:TextArea id="activityinput" width="650" height="28" borderVisible="false" contentBackgroundColor="{_u.user.workAreaColour}" focusThickness="0" horizontalCenter="-17" ligatureLevel="minimum" restrict="abcdefghijklmnopqurstvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ ,.:;?!'\-" styleName="WordsEnabled" verticalCenter="0" keyDown="activityinput_keyDownHandler(event)" enabled.correct="false" enabled.markable="true" creationComplete="activityinput.setFocus()" enabled.wrong="false"/> ________________________________________ From: Scott Matheson [smathe...@intralinks.com] Sent: Sunday, June 29, 2014 9:56 AM To: users@flex.apache.org Subject: Simple Methord to stop CRLF in textArea Hi i want to dibble the user from typing in CRLF, I want the text area to stay as 3 lines with no score bars one approach is to the text types with an event activityinput.addEventListener(TextEvent.TEXT_INPUT,texteinput); but i can not see to find a method to check for the \r i.e. if(e.target.text == "\r") does not work ________________________________ Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you. ________________________________ Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.