[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Problem with TableTreeViewer with SWT.CHECK on FEDORA CORE 3 -- HELP NEEDED!

my bad, you'd need to use the TreeViewer rather than the TableTreeViewer:

TreeViewer viewer = new TreeViewer(parent, style);
		
Tree tree = viewer.getTree();
		
TreeColumn column0 = new TreeColumn(tree, SWT.LEFT);
column0.setText("col 0");
column0.setMoveable(true);
column0.pack();

TreeColumn column1 = new TreeColumn(tree, SWT.RIGHT);
column1.setText("col 1");
column1.setMoveable(true);
column1.pack();


your content providers shouldn't need to change:

viewer.setContentProvider( ITreeContentProvider );
viewer.setLabelProvider( ITableLabelProvider );




Preetam wrote:
But  I am using TableTreeViewer to build tree
how can I get Tree from it ?
I can get only TableTree and TableTreeItem
Can somebody give me a sample code for the same ?

Thanks
~Preetam



"Jeremy Dowdall" <dev@xxxxxxxxxxxxxxxxxxx> wrote in message
news:dmppo1$pjp$1@xxxxxxxxxxxxxxxxxxx

tabletree is apparently deprecated for issues such as this (lots of
discussions earlier in this newsgroup on it)

your best bet is to switch to a Tree with TreeColumns - the good news is
that it's "almost" a drop-in replacement :)


Preetam wrote:

Hi All,
   I have a tabletreeviewer with SWT.CHECK style
This tree looks good on win 2k but looks improper in fedora core 3

I means on fedora the nodes at verious levels of tree should get

indented to

right. The tree hirarchy should get clear.
   I m attaching the sample pic.
See that node1 has child node2 which has also a child node3
The relation between node1 and node2 does not get seen properly wheare

as

the relation between node2 and node3 is clear deu to indentation !

Any clue ?

Thanks
~Preetam