Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sort the elements in Tree in SWT

 
Chethan Sharma
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can some one suggest me how to sort the elements in Tree view in swt.
any urls or some sample code is very useful for me.

Thanks in Advance,

Regards,
 
Dhanya Palanisamy
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chethan,

Some more information is needed to answer your question. Sort means, what is your tree view now, what you want to change?
 
Chethan Sharma
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to sort the names by ascending or descedning order in a tree view.
Under Tree View
--- xxx
----bbb
----jjj

the result should be in
-- bbb
--jjj
---xxx
Thanks,
 
Dhanya Palanisamy
Ranch Hand
Posts: 61
 
Chethan Sharma
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you reply.

I need to sort the names(childrens) in a tree view.(in SWT)
Would you please provide info on SWT
 
Dhanya Palanisamy
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use a JFace Tree Viewer - view sorter.
check here:
http://www.eclipse.org/articles/Article-TreeViewer/TreeViewerArticle.htm
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic