Hi All,
I have created an SWT table (style SWT.CHECK) following the SWT code snippet in link below:
http://www.java2s.com/Tutorial/Java/0280__SWT/TableCellEditorComboTextandButton.htm
<http://www.java2s.com/Tutorial/Java/0280__SWT/TableCellEditorComboTextandButton.htm>
As in snippet I have created three rows in table, first row contains SWT Combo, the other two contains SWT text boxes
My requirement is that I need to remove the selected (checked)items from table. But this could not be achieved. When I try to remove the selected item only the check box is being removed, other items in that row (combo and text boxes) remains there.
The code used to remove the item is as follows,
TableItem[] items = table.getItems();
for (TableItem item : items) {
if(item.getChecked()){
table.remove(table.indexOf(item));
}
}
Is it because we are placing SWT controls as table item?
1. Please suggest a way to remove the table items with SWT Controls in it...
2. Also please let me know how I can access individual controls (Combo box and values in it)
Regards,
Srirekha