|CheckboxTableViewer with more than 2 columns? [message #1103227]
||Fri, 06 September 2013 14:08
| Alan DW
Registered: March 2012
as we all know, the default CheckboxTableViewer is a handy widget and uses two columns: one for the checkboxes and one for displaying the elements. What I would like to have is an additional text column, such that the column layout is like this:
The last text column should just display some additional information about the item in question. I tried to solve it like this:
Table table = new Table(composite_6, SWT.CHECK);
TableColumn tc0 = new TableColumn(table, SWT.NONE);
TableColumn tc1 = new TableColumn(table, SWT.NONE);
this.checkboxTableViewer = new CheckboxTableViewer(table);
... but if I do that, I don't see any content anymore in the table, regardless of the input. Is it possible to do it this way? If so, how would the "getElements()" return array of the TableContentProvider have to be structured? After all, it has to provide content for more than 1 column now...
I'm still new to SWT, so sorry if this is a dumb question or has been asked before, I'd be glad for any help!
Powered by FUDForum
. Page generated in 0.03141 seconds