Skip to main content


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 BeckerFriend
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 FauthFriend
Messages: 2902
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 BeckerFriend
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: Fri Apr 19 21:01:52 GMT 2024

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

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

Back to the top