2

I have a UItable in MATLAB appdesigner, let's say 'app.UITable'. Can I change the selected cell via callback function? For example, I would like to move one cell down when Enter key is pressed. For what I read, new MATLAB uiobjects do not accept button-press callbacks. Is that true? or is there any known hack to do that? Thank you.

Related post

girdeux
  • 585
  • 1
  • 5
  • 11

1 Answers1

1

As of R2018b, new figure interactions were added. Regarding your specific question, you should take a look at these new keyboard interaction callbacks:

  • KeyPressFcn - This callback function executes when the user presses a key while the figure or a child object has focus. If the user presses a key on a UIControl or Table component, the callback does not execute unless the Enable property is set to 'off'.
  • KeyReleaseFcn - This callback function executes when the user presses [sic] a key while the figure or a child object has focus. If the user releases a key on a UIControl or Table component, the callback does not execute unless the Enable property is set to 'off'.
  • WindowKeyPressFcn - This callback function executes when the user presses a key while the figure or a child object has focus.
  • WindowKeyReleaseFcn - This callback function executes when the user releases a key while the figure or a child object has focus..

See also: R2018 Release notes.

Dev-iL
  • 23,742
  • 7
  • 57
  • 99