Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Can I create my own cell editors on TreeItem columns?
Can I create my own cell editors on TreeItem columns? [message #463178] Fri, 28 October 2005 14:02 Go to next message
Stefan Junsved is currently offline Stefan JunsvedFriend
Messages: 56
Registered: July 2009
Member
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 #463179 is a reply to message #463178] Fri, 28 October 2005 14:30 Go to previous messageGo to next message
Stefan Junsved is currently offline Stefan JunsvedFriend
Messages: 56
Registered: July 2009
Member
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?

/Stefan

"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message
news:djtb2e$77p$1@news.eclipse.org...
> 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 15:51 Go to previous messageGo to next message
Adam Pordzik is currently offline Adam PordzikFriend
Messages: 19
Registered: July 2009
Junior Member
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 09:15 Go to previous message
Stefan Junsved is currently offline Stefan JunsvedFriend
Messages: 56
Registered: July 2009
Member
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
>
> --
Previous Topic:still no tiff T6/G4 support in SWT?
Next Topic:I wrote a Visual Editor tutorial
Goto Forum:
  


Current Time: Sun Nov 23 17:32:33 GMT 2014

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

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