Tuesday, April 21, 2009

Code for selecting/de-selecting the checkboxes in the child items of tree SWT

Below is a small snippet of code for selecting/de-selecting the checkboxes in the child items of tree

TreeItem[] itm = tree.getItems();
for(int i =0; i <>
//getting the child items for the parent items
TreeItem[] childItm = itm[i].getItems();
for(int j = 0; j <>
childItm[j].setChecked(true); //use false for de-selecting
}
}

No comments:

Post a Comment