|toggle not appearing in tree column in CTableTree [message #564767]
||Mon, 04 September 2006 23:07
| Al Major
Registered: July 2009
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
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.
/* fViewer = new TreeViewer(parent,
SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI |
final Tree t = fViewer.getTree();
fViewer = new CTableTreeViewer(parent);
final CTableTree t = fViewer.getCTableTree();
// fAreaCol = new TreeColumn(t, SWT.LEFT);
fAreaCol = new CContainerColumn(t, SWT.LEFT);
// fSalesCol = new TreeColumn(t, SWT.LEFT);
fSalesCol = new CContainerColumn(t, SWT.LEFT);
fViewer.setLabelProvider( new GroupsLabelProvider() );
fViewer.setContentProvider( new GroupsContentProvider() );
Powered by FUDForum
. Page generated in 0.01539 seconds