File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 19656
    
  18

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
 
Consider Paul's rocket mass heater.
 
subject: Scroll inside styledText
 
Similar Threads
AutoScroll text to bottom of a StyledText component in SWT
How to give scrollbars to JTextArea when lines are greater than 3??
Scrolling adjustment
AutoScroll text to bottom of a StyledText component in SWT
urgent can somebody get this scrollbar move down