Positioning things in a textarea is at least close to impossible...
thats why I started my project http://code.google.com/p/axedarea/
first place, it is useable to a certain degree, but you yet won't find
you being truely happy with it, as especially on the WYSIWYG quite
some front stuff is missin
You can simply adjust the "height" until "scrollHeight" is equals to
"clientHeight".
The problem is that you cannot use this to shrink the TextArea
automatically. In this case you would have to set the height to
something very low, like 10px, and then check scrollHeight and
readjust "height" again
I'm afraid it is not that easy. You can not just count the '\n's in
the text, because you also have to look at the length of each line. As
we all know if the line is longer than the width of the textarea, it
will display the new words in a new line automatically and without a
'\n'.
So you have to
Theres no automatic way to do this. What you would need to do is:
Add a KeyboardListener to the TextArea and in onKeyDown look for the number of
lines in the TextArea's content (plus one if the key is KEY_ENTER). Use
TextArea.setVisibleLines to make sure that the size of the TextArea is >= the
Hello,
I'm new to GWT. Is there a way to NOT have a scrollbar for the
TextArea and have it grow automatically when data goes beyond the
visible lines? We do not use gwt-ext. I was able to take the scrollbar
out with overflow:hidden but was not able to do the autosize part.
Thanks in advance for a