Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Scrolling in the JFace Tree Viewer
Scrolling in the JFace Tree Viewer [message #900944] Thu, 09 August 2012 07:49 Go to next message
saurav sarkar is currently offline saurav sarkarFriend
Messages: 428
Registered: July 2009
Senior Member
Hi All,

I am using a tree viewer in the master details framework at the master part.

My parent composite uses Grid Layout.

I initialize the tree like this

FilteredTree filteredTree = new FilteredTree(treeComp, SWT.BORDER | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL, new PatternFilter(), true);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(filteredTree);


Whenever my editor opens i dont get a scroll bar but when i expand my tree items i get it.
Seems like this problem
http://stackoverflow.com/questions/2939108/how-to-set-initial-size-of-a-treeviewer

Also i found that if the parent composite's layout is Gridlayout,then the chidlren's scrolling behaviour is not recognized properly from here

http://stackoverflow.com/questions/2540391/how-to-make-a-listviewer-scrollable

I want to get the vertical scroll whenever the user opens the editor much like the Manifest editor.
Any help will be hugely appreciated.

cheers,
Saurav


Re: Scrolling in the JFace Tree Viewer [message #900950 is a reply to message #900944] Thu, 09 August 2012 08:03 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi, you have to set a hint to the viewer's control.
Re: Scrolling in the JFace Tree Viewer [message #900971 is a reply to message #900950] Thu, 09 August 2012 09:19 Go to previous message
saurav sarkar is currently offline saurav sarkarFriend
Messages: 428
Registered: July 2009
Senior Member
Thanks a lot Jan that worked.

I took the points of the parent composite and set that point as a hint for the tree viewer's data.

cheers,
Saurav


Previous Topic:Add a double click listener on a TableViewerColumn
Next Topic:Modify indent of tree elements
Goto Forum:
  


Current Time: Tue Mar 19 04:12:54 GMT 2024

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

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

Back to the top