0

Run tree items

asked 2009-10-16 11:57:53 +0800

houcine gravatar image houcine
108 1 1

updated 2009-10-16 13:34:20 +0800

How can i run the items of a tree:
something like:
for(int i = 0 ; i < tree.getItems().size() ; i++){
if(tree.getItemAtIndex(i).isSelected()){
doSomething();
}
}

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-10-16 13:51:41 +0800

YamilBracho gravatar image YamilBracho
1722 2

Use the getSelectedItems method(). For example:

Set set = tree.getSelectedItems();
for (Iterator it=set.iterator(); it.hasNext();) {
   Treeitem ti = (Treeitem) it.next();
   doSomething(ti);
}

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-10-16 11:57:53 +0800

Seen: 159 times

Last updated: Oct 16 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More