Search code examples
javaswtjfacetableviewer

SWT Table Viewer add checkbox on row selection


In my table viewer, I want to add a checkbox to the last column when the user selects a row. How can I do this ?


Solution

  • Afaik tables only have checkbox icon in the first column.

    Additional icons/checkboxes would have to be drawn manually.

    Another option is to insert controls manually into table items. E.g insert a composite with checkbox + text. An example of how to insert a control into a table can be found in: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet126.java