aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Scroll inside styledText Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Scroll inside styledText" Watch "Scroll inside styledText" New topic
Author

Scroll inside styledText

Liwuen Chew
Greenhorn

Joined: Mar 11, 2010
Posts: 24
Hi!
Recently I made an swt application with an styledtext inside of it. I use the styledtext.setText() method to make the styledText to display a lot of lines. The problem is that the styledText keeps showing the beginning of the list of lines, and it does not scroll down until the last character.
Is there a way to make it scroll down after using the setText method? Thanks!
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

1) Set the caret position to the end.
2) Set the value of the vertical JScrollBar to its maximum.
3) ??


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scroll inside styledText