To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
I have a complex GUI, but I have what I think is a fairly simple problem.
I have keyboard commands set to various commands including button presses (This is because eventually the GUI needs to operate as keyboard only). The problem I have is that I have to manually click the figure window before it allows the GUI to recognise that I'm pressing keyboard buttons.
Is there a way to set the current figure to be the focus so that I don't need to use the mouse?
Thanks in advance!
No products are associated with this question.
You need to steal focu back to the figure from whatever uicontrol/uipanel/axes/etc. has stolen it.
To do this, at the end of a callback function for one of these widgets:
set(H, 'Enable', 'off'); drawnow; set(H, 'Enable', 'on');
Where H is the handle to that widget.