Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Multiple Column Edits on a Tree Viewer
Multiple Column Edits on a Tree Viewer [message #333510] Tue, 16 December 2008 12:47 Go to next message
Eclipse UserFriend
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 12:48 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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.
>
>
>
Previous Topic:get File or class Name from IDocumet
Next Topic:Atomic add and configuration of nature
Goto Forum:
  


Current Time: Fri Apr 26 18:08:08 GMT 2024

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

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

Back to the top