Kai
Kai

Reputation: 993

How to enable cursor selector in GWT TextArea?

In my application I call an API to get the contents of the file as a String and use the TextArea UIWidget to display the file content to the user.

I want the user to be able to select the text in the text area in order to be able to copy and paste the contents of the file. When I hover over the TextArea in GWT, text selection is not being enabled. The getCursorPos function in the TextArea seems to be useful when modifying the textarea but not for selectionsenter image description here

Upvotes: 0

Views: 128

Answers (1)

Andrei Volgin
Andrei Volgin

Reputation: 41099

Text selection is enabled in TextArea by default. You either disabled it somewhere setEnabled(false), or you put another widget (panel) on top of your TextArea which prevents users from typing in or selecting a text.

Upvotes: 0

Related Questions