I am using a textarea in my GWT application:
@UiField TextArea inputArea;
When the user hits the return key the text should be deleted and the cursor should be set to the beginning of the textbox.
I tried the following:
inputArea.setText("");
This is not working. The textbox seems to be empty, but the cursor is at the beginning of the second line of the textbox, not at the beginning of the first line of the textbox, where it should be.
I also tried it with: inputArea.setCursorPos(0); but it did not worked.
How can I make sure that the cursor is set at the beginning of line one after the text is deleted?
I tried
inputArea.setText( "" ); inputArea.setFocus( true ); inputArea.setCursorPos( 0 );
but this does not work.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment