Search code examples
gwtgwt2

Disabling line wrapping in a TextArea


I'm using GWT 2.1. I have a TextArea that I'm using to preview a document, and I don't want lines that are too long to fit to wrap - I want a horizontal scrollbar to appear.

There's no setWrap method I can find in TextArea - how can I achieve this?


Solution

  • textArea.getElement().setAttribute("wrap", "off");