Reputation: 2718
For a tree with 2 columns like,
TreeColumn column1 = new TreeColumn(myTreeViewer.getTree(), SWT.LEFT);
column1.setText("Column 1");
column1.setWidth(400);
TreeColumn column2 = new TreeColumn(myTreeViewer.getTree(), SWT.LEFT);
column2.setText("Column 2");
column2.setWidth(100);
I can only select the items in the first column.
I can see that the selection is disabled in the 2nd column so,
Ho can I enable selection of items in the 2nd column ?
Upvotes: 1
Views: 1259
Reputation: 29139
Add SWT.FULL_SELECTION to the styles when creating the Tree widget. This will allow you to click on a cell in either column to select a row. Note that you cannot select cells in SWT Table and Tree widgets. Only rows can be selected.
Upvotes: 5