This content has been marked as final. Show 7 replies
No. Unless, of course, you're willing to subclass it or create a new component.
Why wouldn't you be able to use a TextArea? I know you've said it would cause problems but I'm trying to decipher what would be more difficult, trying some hacky way of getting word wrap to work with a TextInput, or dealing with some of those 'other' issues when using a TextArea.
What problems would a TextArea cause? Text Areas are awesome! If you have a problem with them, you have a problem with me. ;)
If you tell me the issue with the TextArea option, I may be able to help.
i m using textArea instead of inputText...... for NOW.
i explain what is the prob i m facing using this textArea...... user enter the message to send in textArea...... and there is a button "send", there are two events can happen.....1. they may click on send, 2. they may hit "Enter key"... right!!
if they click mouse on "send" button then there is no prob.
if they hit "enter" key........ then message commonely send as per code..... but u know what happnes if u have curson in textArea and u hit "enter" key.... it takes the cursor to next line...........means after sending the message......the cursor stays at second line......(as this not happen if we use inputText).....
this is what real thing.......
hope u may help me...
listen for keyDown or keyUp events, call the code to send the message when you get the enter key code, 13.
thnx for your response,
but, as u said... i m tracking the send button on KeyDown event with 13 code of enter key... and it is working fine... the problem is not that one......!
see after u enter a message in text area.. the u hit "enter" key.. then according to our keydown code...... it takes the text whatever entered in text area for further processes..... but after hitting the enter key... cursor remains in "TextArea"...which makes cursor to move to next line...leaving first line blank....while u try this with "inputText"... that dont do this......it sets the cursor again to begning of first line.........
i think u got mine prob
please help me
I'm afraid i don't fully understand the problem. As far as I've understood if you call event.preventDefault() once you've handled the enter key it should work. Please post some code if it's possible.