2

I have a SWT Tree, and I want to set the cursor to a particular cell of that SWT Tree. I have access of TreeViewer.

The screenshot below shows the cursor at column 1. I did it manually, but I want to do it programatically.

enter image description here

Baz
  • 36,440
  • 11
  • 68
  • 94
Abhishek Choudhary
  • 8,255
  • 19
  • 69
  • 128

1 Answers1

2

Have a look at TreeViewer#editElement(Object element, int column).

Where element is the model element and column the column in your table.

The Javadoc states:

Starts editing the given element at the given column index.

Baz
  • 36,440
  • 11
  • 68
  • 94