Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Problem while removing SWT Controls from SWT Table (Style : SWT.CHECK)

 

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

 

 
***** Confidentiality Statement/Disclaimer *****

This message and any attachments is intended for the sole use of the intended recipient. It may contain confidential information. Any unauthorized use, dissemination or modification is strictly prohibited. If you are not the intended recipient, please notify the sender immediately then delete it from all your systems, and do not copy, use or print. Internet communications are not secure and it is the responsibility of the recipient to make sure that it is virus/malicious code exempt.
The company/sender cannot be responsible for any unauthorized alterations or modifications made to the contents. If you require any form of confirmation of the contents, please contact the company/sender. The company/sender is not liable for any errors or omissions in the content of this message.

Back to the top