Skip to main content



      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 02:59 Go to next message
Eclipse UserFriend
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 07:10 Go to previous messageGo to next message
Eclipse UserFriend
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 08:03 Go to previous message
Eclipse UserFriend
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: Sun Aug 31 18:50:14 EDT 2025

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

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

Back to the top