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:
http://dev.eclipse.org/viewcvs/index.cgi/platform-swt-home/snippits/snippet88.html?rev=1.3 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? Javaworld.com 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.
Thanks.