I have a scrollable TextArea, when I add text using setText("...") the Horizantal scrollbar goes to the bottom. I want the scrollbar at the top so the use sees the text at the beginning, not the ending text. Any ideas?
kate damond
Ranch Hand
Joined: Apr 17, 2001
Posts: 77
posted
0
Yes, irritating isn't it : there should be a method like .ensureIndexIsVisible(int) like there is for Lists. But there isn't. You can do it as a side affect of setCaretPosition :
which is a bit cheesy... but then I suppose it's logical to only let your users start editing on the bit they can see. (Seems to work for non-editable TextArea too) Kate