toggle not appearing in tree column in CTableTree [message #564767] |
Mon, 04 September 2006 23:07 |
Al Major Messages: 72 Registered: July 2009 |
Member |
|
|
i took an existing working example of a View that uses a TreeViewer and
changed it to use a CTableTreeViewer. i got the following code. most of
the code remains unchanged (other than obvious changes of type, the
commented out sections correspond to the TreeViewer code). i had to add
lines to set the cell provider and to set the tree column.
so, the transition was quite painless. the content and label providers
are unchanged.
unfortunately, i'm not seeing the toggles that should appear in the tree
column to permit viewing of children (as happens with the TreeViewer).
the corresponding cell provider is set to "null". i'm wondering if i did
something wrong or if this is a bug.
this is running on windows XP.
regards,
al
/* fViewer = new TreeViewer(parent,
SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI |
SWT.FULL_SELECTION);
final Tree t = fViewer.getTree();
*/
fViewer = new CTableTreeViewer(parent);
fViewer.setCellProvider(new Class[]{null,
MultiLineTextCell.class});
final CTableTree t = fViewer.getCTableTree();
t.setTreeColumn(0);
// fAreaCol = new TreeColumn(t, SWT.LEFT);
fAreaCol = new CContainerColumn(t, SWT.LEFT);
fAreaCol.setText("Area");
fAreaCol.setWidth(200);
// fSalesCol = new TreeColumn(t, SWT.LEFT);
fSalesCol = new CContainerColumn(t, SWT.LEFT);
fSalesCol.setText("Sales");
fSalesCol.setWidth(200);
t.setHeaderVisible(true);
t.setLinesVisible(true);
fViewer.setLabelProvider( new GroupsLabelProvider() );
fViewer.setContentProvider( new GroupsContentProvider() );
|
|
|
Powered by
FUDForum. Page generated in 0.04425 seconds