Hey, I've taken a shot at this problem with pretty good results. Check out the code here: https://gist.github.com/833873
The textarea will stretch pretty reliably as the user types/cuts/pastes text. The way it does this is by maintaining an internal representation of characters-per-line. The only caveat is that you need a PX_PER_CHAR constant, so if the user changes font size or you use a variable-width font, it wont behave as expected. As for calculating the initial size, with this widget you can call setText(getText()) (or add your own init() method that does the same). Hope this helps! -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
