Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeViewer refresh() collapse problem-- SWT(TreeViewer refresh() collapse problem-- SWT)
TreeViewer refresh() collapse problem-- SWT [message #528056] Mon, 19 April 2010 06:59 Go to next message
Prasad  is currently offline Prasad Friend
Messages: 8
Registered: April 2010
Junior Member
Hi all,
I am calling refresh() method on SWT TreeViewer object..all the previously expanded items are getting collapsed..
I want to have the previous state of tree after i call refresh() method...

How to do this.. any suggestions please...

Thanks,
Prasad.
Re: TreeViewer refresh() collapse problem-- SWT [message #528394 is a reply to message #528056] Tue, 20 April 2010 11:10 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
Prasad wrote:
> Hi all,
> I am calling refresh() method on SWT TreeViewer object..all the
> previously expanded items are getting collapsed..
On my Ubuntu machine, treeViewer.refresh() does NOT collapse the
expanded tree items. Which platform you are using? Try to provide
snippet for more info.
Anyway, this question related more to be on JFace side and hence, any
further communication should be carried on eclipse.platform.jface newsgroup
Re: TreeViewer refresh() collapse problem-- SWT [message #528401 is a reply to message #528394] Tue, 20 April 2010 12:03 Go to previous message
Prasad  is currently offline Prasad Friend
Messages: 8
Registered: April 2010
Junior Member
i was calling the treeViewer.refresh(), it was collapsing the items..

I solved this problem..by refreshing the desired item and expanding the same item as following...

treeViewer.refresh(treeItem.getData());
treeViewer.expandToLevel(treeItem.getData(), AbstractTreeViewer.ALL_LEVELS);

this works for me...

Thanks,
Prasad.

Previous Topic:TreeItem setBackGround() not working....
Next Topic:Aligning button text to the left, yet expand button?
Goto Forum:
  


Current Time: Fri Apr 19 11:23:37 GMT 2024

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

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

Back to the top