Can I create my own cell editors on TreeItem columns? [message #463178] |
Fri, 28 October 2005 10:02  |
Eclipse User |
|
|
|
Hi.
I use the Tree widget toghether with the TreeItem widget. I create three
columns, the column where all the tree items are displayed, and two more
columns. I would very much be able to create my own cell editors on the two
last columns, such a text cell editor, and a checkbox cell editor. Is that
possible??
Thanks.
/Stefan
|
|
|
|
Re: Can I create my own cell editors on TreeItem columns? [message #463180 is a reply to message #463179] |
Fri, 28 October 2005 11:51   |
Eclipse User |
|
|
|
Stefan Junsved wrote:
> Sorry !
>
> I've just found the TreeEditor class...though this just provides me with the
> possibility to edit one column, and not several columns.
> Is it possible to add a selection adapter on each column and not only on the
> tree item?
Sure? AFAIK you can have multiple ControlEditor, one for each column,
And it depends on you which you display on whatever condition.
Create e.g devised code:
Table t = new Table
TableEditor te1 = new ...
TableEditor te2 = new ...
TableEditor te3 = new ...
Text column1edit = new ...
Text column2edit = new ...
Text column3edit = new ...
inside one of your table Listeners:
te1.setEditor(column1edit, tableItem, 0);
te2.setEditor(column2edit, tableItem, 1);
te3.setEditor(column3edit, tableItem, 2);
something like this SHOULD work.
A
--
|
|
|
Re: Can I create my own cell editors on TreeItem columns? [message #463306 is a reply to message #463180] |
Thu, 03 November 2005 04:15  |
Eclipse User |
|
|
|
Thank you for your help Adam. It works just the way I wanted it now.
/Stefan
"Adam Pordzik" <adresseverbummelt@gmx.de> wrote in message
news:djthda$gf2$1@news.eclipse.org...
> Stefan Junsved wrote:
>> Sorry !
>>
>> I've just found the TreeEditor class...though this just provides me with
>> the possibility to edit one column, and not several columns.
>> Is it possible to add a selection adapter on each column and not only on
>> the tree item?
>
> Sure? AFAIK you can have multiple ControlEditor, one for each column,
> And it depends on you which you display on whatever condition.
>
> Create e.g devised code:
>
> Table t = new Table
>
> TableEditor te1 = new ...
> TableEditor te2 = new ...
> TableEditor te3 = new ...
> Text column1edit = new ...
> Text column2edit = new ...
> Text column3edit = new ...
>
> inside one of your table Listeners:
>
> te1.setEditor(column1edit, tableItem, 0);
> te2.setEditor(column2edit, tableItem, 1);
> te3.setEditor(column3edit, tableItem, 2);
>
> something like this SHOULD work.
>
> A
>
> --
|
|
|
Powered by
FUDForum. Page generated in 0.07239 seconds