Multiple Column Edits on a Tree Viewer [message #333510] |
Tue, 16 December 2008 07:47  |
Eclipse User |
|
|
|
Originally posted by: beirtipol.gmail.com
Hi,
I'm want to use a tree viewer to display a row object with the following
properties:
String name, Boolean bool1, Boolean bool2, Boolean bool3
I'd like to allow editing of all the properties, a text editor for the
first column and a checkbox editor for the other 3.
I can get all of this rendered by:
- Creating a TreeViewer
- Setting a Content and Label Provider
- Setting the input on the viewer
- Setting a CellModifier on the viewer which returns true for all
properties
- Setting the CellEditors on the viewer to an array of 1 TextEditor and 3
CheckEditors
- Setting the Column Properties on the viewer
I get a TextCellEditor working on the first column, but not on other
columns. Is it something to do with the selection style of the tree?
I've been hunting for examples/snippets but no joy.
|
|
|
Re: Multiple Column Edits on a Tree Viewer [message #333512 is a reply to message #333510] |
Tue, 16 December 2008 07:48  |
Eclipse User |
|
|
|
I guess you didn't passed SWT.FULL_SELECTION when the TreeViewer is created.
Tom
Beirti O'Nunain schrieb:
> Hi,
>
> I'm want to use a tree viewer to display a row object with the following
> properties:
>
> String name, Boolean bool1, Boolean bool2, Boolean bool3
>
> I'd like to allow editing of all the properties, a text editor for the
> first column and a checkbox editor for the other 3.
>
> I can get all of this rendered by:
>
> - Creating a TreeViewer
> - Setting a Content and Label Provider
> - Setting the input on the viewer
> - Setting a CellModifier on the viewer which returns true for all
> properties
> - Setting the CellEditors on the viewer to an array of 1 TextEditor and
> 3 CheckEditors
> - Setting the Column Properties on the viewer
>
> I get a TextCellEditor working on the first column, but not on other
> columns. Is it something to do with the selection style of the tree?
>
> I've been hunting for examples/snippets but no joy.
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 1.58879 seconds