Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Scrolling a JFace Viewer
Scrolling a JFace Viewer [message #1000362] Mon, 14 January 2013 15:46 Go to next message
Joel Becker is currently offline Joel Becker
Messages: 14
Registered: December 2012
Junior Member
Hi,

When I add items to my ListViewer, I need to scroll it down such that the newest item is visible. The only possibility I could find was the ListViewer.scrollDown() method, which for testing I called with scrollDown(0, 100) whenever an item was added, but this did nothing, beside being more low-level than preferred. How can one scroll a ListViewer to the bottom?
Re: Scrolling a JFace Viewer [message #1000659 is a reply to message #1000362] Tue, 15 January 2013 07:38 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1339
Registered: July 2012
Senior Member
Hi,

although you are a the wrong forum as you have a question related to JFace and not about Eclipse 4, the answer is quite easy. Try to use the reveal(Object) method on your viewer. It will ensure that the given element is visible, scrolling the viewer if necessary.

Greez,
Dirk
Re: Scrolling a JFace Viewer [message #1000954 is a reply to message #1000659] Tue, 15 January 2013 19:11 Go to previous message
Joel Becker is currently offline Joel Becker
Messages: 14
Registered: December 2012
Junior Member
reveal()! there it is!
Thanks, Dirk.
Previous Topic:Why will EModelService not find the part Toolbar?
Next Topic:A service to replace Platform.getAdapterManager() ?
Goto Forum:
  


Current Time: Thu Oct 23 06:49:26 GMT 2014

Powered by FUDForum. Page generated in 0.01630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software