Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using TableCursor & ICellModifier together  RSS feed

J Arshad
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Yet another stumbling block encountered while implementing an Excel-like function using JFace & SWT:-(

I have an implementation of ICellModifier, called MyCellModifier (along with MyLabelProvider & MyContentProvider). That setup work all fine - it allows the user to click on a cell, start editing & then press enter to register the new value.

I also needed to implement the keyboard navigation within my table (which is a jface TableViewer). To this end, I have

final TableCursor cursor = new TableCursor(iTableViewer.getTable(), SWT.NONE);
final ControlEditor editor = new ControlEditor(cursor);

This combination also works fine on its own. The trouble starts when I attempt to use both editing functionalities together. It seems that the TableCursor has some kind of precedence over ICellModifier. Adding TableCursor disables the ICellModifier & leaves the table only navigatble using the keyboard. A cell no longer becomes editable when you click on it!

Does anyone know how I can fix this.

BTW, I think the world would be an infinitely better place if there were more JFace examples on the web!

[ February 08, 2005: Message edited by: J Arshad ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!