[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Problem with TableTreeViewer and CheckboxTreeViewer -- HELP NEEDED!

This is a known problem on GTK - indentation is not supported.  This is why 
in 3.1 we deprecated TableTree and added support for Tree with TreeColumn.

See:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet170.java?rev=HEAD&content-type=text/vnd.viewcvs-markup

TreeViewer also supports TreeColumn.


"Preetam" <preetamp@xxxxxxxxx> wrote in message 
news:dmpd62$5qv$1@xxxxxxxxxxxxxxxxxxx
> Thanks !
> I did that
> But now i have one more problem  !
> The tree i created looks good on windows 2K
> but does not look proper on Linux 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
>
>
>
> "Veronika Irvine" <veronika_irvine@xxxxxxx> wrote in message
> news:dlaom2$7m3$1@xxxxxxxxxxxxxxxxxxx
>> Since you created the underlying tree with the SWT.CHCK style you should
> use
>> Tree.addSelectionListener() and in the event.detail look for SWT.CHECK
>> to distinguish the checkbox selection from selecting the row.
>>
>> "Preetam" <preetamp@xxxxxxxxx> wrote in message
>> news:dla9it$fn8$1@xxxxxxxxxxxxxxxxxxx
>> > Hi,
>> >    I have created a checked box table tree using
>> >  checkboxTableTreeViewer = new TableTreeViewer(parent, SWT.CHECK);
>> > and have associated a table tree editor like
>> > .......
>> > final TableTreeEditor tableTreeEditor = new TableTreeEditor(tableTree);
>> > .......
>> >
>> > this works fine but now I want to listen for check event of the checked
>> > tree
>> > ?
>> > How can I do this ?
>> > I tried
>> >  CheckboxTreeViewer checkboxTreeViewer = new CheckboxTreeViewer(
>> >   checkboxTableTreeViewer.getTableTree());
>> >  checkboxTreeViewer.addCheckStateListener(new
>> > CheckboxTreeViewerCheckStateChanged());
>> >
>> > But the control never comes to CheckboxTreeViewerCheckStateChanged 
>> > class
>> > (function checkStateChanged )
>> >
>> > Am I doing wrong ?
>> > what's the correct way   to create such a control ?
>> > Thanks in advance
>> > ~Preetam
>> >
>> >
>> >
>> >
>>
>>
>
>
>