Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Editable Table in SWT?  RSS feed

K Riaz
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been trying to make a very simple 2 column table with several TableItem objects (i.e rows in the table as their called). This is then "wrapped" up in a TableEditor object (as opposed to leaving it in a read-only Table object), exactly as the example shown on the Eclipse "snippets" website:

This works great but it has one big limitation - it only allows edition of ONE column at run-time (hence the "final int EDITABLECOLUMN = 1;" in the code).

I want to be able to edit 2 columns but have failed in my attempt. How can I do it? I am reading some data in from an XML file, parsing it and placing certain elements into the Table (i.e. element name, element value - hence the 2 columns). Its trival, but I want to be able to edit both details, not just the value of the element (which is what I have now).

Any ideas? had an example of TableEditor but it avoided direct editing within the TableEditor, and instead popped up a dialog for the user to edit data. I am sure SWT can do this, it seems like a basic feature of any Table Editor.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!