Overriding Ctrl+Z behavior in matlab zoom mode

ぃ、小莉子 提交于 2019-12-13 02:07:47

问题


I want my own Ctrl+Z handler called while in zoom mode rather than the default handler. I found this article on Undocumented Matlab and tried this:

function zoomIn_OnCallback(hObject, eventdata, handles)
  set(handles.image_handle, 'ButtonDownFcn', []);
  zoom on;
  [handles.mode_manager.WindowListenerHandles.Enabled] = deal(false);
  handles.theGui.WindowKeyPressFcn =  [];
  handles.theGui.KeyPressFcn = @theGui_KeyPressFcn;
end

The code executes, but doesn't override the Ctrl+Z behavior of zoom mode.

I thought I exactly followed the example code from Undocumented Matlab, but obviously something isn't right.

来源:https://stackoverflow.com/questions/38987567/overriding-ctrlz-behavior-in-matlab-zoom-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!