This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This is the expected behavior for MATLAB under Windows. On UNIX systems, clicking on the menubar of the figure window causes the edit text callback to execute. However, on Windows systems, if an editable text box has focus, clicking on the menu bar does not cause the editable text callback routine to execute. This allows you to select text in an editable text box, and then choose copy/cut/paste routines from the menubar without executing the callback.
This behavior is consistent with the respective platform conventions. Clicking on other components or the background of the GUI executes the callback.
This issue has been forwarded to our documentation team to be clarified in future documentation.
If you would like for your editable text box's callback to execute when you click on a UIMENU, then you can use the following as a workaround:
figure(gcbf);
drawnow;
get(handles.edit, 'string')
Best Answer