GUIDE: gcf windowscrollWheelFcn and gca ButtonDownFcn interaction
Mostrar comentarios más antiguos
Hello, thanks for reading this,
I have a problem at the moment with a interaction of axes ButtonDownFcn and the gcf's windowscrollWheelFcn.
I made a simple gui in GUIDE with two axes, and when I ButtonDownFcn on either axes I can print unique messages. Additionally, when I click on a axes and use the windowscrollWheelFcn, I can perform a callback on the axes (I replot rand). However, when I do the windowscrollWheelFcn the callback to ButtonDownFcn no longer works: I can't reprint the message.
Any ideas? When I reprint, I set the HitTest of the image (not the axes) to off when I replot, but it doesn't help the problem. The windowscrollWheelFcn, however, works just fine, which makes me think its a HitTest issue somewhere that's not being set.
EDIT: I just put the additional command behind the windowscrollWheelFcn:
set(gca,'ButtonDownFcn', @axes1_ButtonDownFcn);
and I was able to use the ButtonDownFcn callback again, but only for one of the unique messages (the ButtonDownFcn I point to out of two possible ButtonDownFcn). Is there a way to preserve the original function passing for ButtonDownFcn when I create the axes?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!