• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Editable Table in SWT?

 
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic