Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » toggle not appearing in tree column in CTableTree
toggle not appearing in tree column in CTableTree [message #564767] Mon, 04 September 2006 23:07
Al Major is currently offline Al MajorFriend
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() );
Previous Topic:embedding GEF/draw2 viewer/figures in table/tree cell
Next Topic:toggle not appearing in tree column in CTableTree
Goto Forum:
  


Current Time: Tue Apr 16 06:26:48 GMT 2024

Powered by FUDForum. Page generated in 0.12484 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top