How to enable cursor selector in GWT TextArea?

半城伤御伤魂 提交于 2019-12-12 02:31:17

问题


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 selections


回答1:


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.



来源:https://stackoverflow.com/questions/31523119/how-to-enable-cursor-selector-in-gwt-textarea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!