When I call TextArea.setSelectionRange(pos,length), I'd like the TextArea to scroll if necessary so that the selected block of text is visible. This seems like it would be a pretty common requirement, but I'm struggling to find a complete solution. I've got good solutions for the two most common special cases:
// Scroll to the top of a TextArea: getElement().setScrollTop(0); // Scroll to the bottom of a TextArea: getElement().setScrollTop(getElement().getScrollHeight()); Those two special cases seem to be working perfectly in Safari, Firefox, Opera, Chrome, and IE8. But there doesn't seem to be any obvious way to scroll to an arbitrary character position in the document. Has anyone else attempted this? Any suggestions would be greatly appreciated. Jim. -- 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.
