When I try to set the zoom or pan objects to off in the post action callback, MATLAB generates an error. The post action callback is structured in the following way:
For zoom:
function myzoompostcallback(obj,evd)hZ = zoom(obj);%turn zoom off
set(hZ,'Enable','off');
This callback creates the following error:
Warning: An error occurred during the mode callback.> In uitools.uimode.fireActionPostCallback at 14 In zoom>localApplyZoomFactor at 1582 In zoom>local2DButtonUpFcn at 1121 In hgfeval at 63 In uitools.uimode.modeWindowButtonUpFcn at 27 In uitools.uimode.setCallbackFcn>localModeWindowButtonUpFcn at 34
For pan:
function mypanpostcallback(obj,evd)hP = pan(obj);%turn pan off
set(hP,'Enable','off');This callback creates the following error:Warning: An error occurred during the mode callback. > In uitools.uimode.fireActionPostCallback at 14 In pan>locWindowButtonUpFcn at 496 In hgfeval at 63 In uitools.uimode.modeWindowButtonUpFcn at 53 In uitools.uimode.modeControl>localModeWindowButtonUpFcn at 155
Best Answer