Matlab App Designer Table cells to be edited on single click

71 Views Asked by At

In Matlab App Designer I have created a table with all the cells in one column having the 'ColumnEditable' property set to 'true'. If I now click on a cell in that column it gets selected. However I can't edit it's content. Only after doing a double click on the cell I can then edit the content.

What would be the right approach to make the cells content editable after the first click?

1

There are 1 best solutions below

0
Matthias La On

Seems I needed the calm of typing down the question to come up with new ideas how to approach the problem.

For the app.UITable I've added the Callback-Function CellSelectionCallback. There I simply simulate an enter-keypress to activate editing the cell directly after the first mouse-click. I do this by this method:

robot = java.awt.Robot;
robot.keyPress    (java.awt.event.KeyEvent.VK_ENTER);
robot.keyRelease  (java.awt.event.KeyEvent.VK_ENTER);