How can I set an ActionPostCallback of zoomInteraction from default axes toolbar (UIAxes / Appdesigner)?
    13 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hey guys,
is there a way to set an ActionPostCallback / ActionPreCallback in the default zoomInteraction of default axes toolbar? In specific, I would like to update several user input fields containing the axes limits after zooming in a UIAxes.
In the past, when I used GUIDE, I had the possiblity of setting the ActionPostCallback of the zoom object:
h = zoom;
h.ActionPostCallback = @mypostcallback;
How can I do that in Appdesigner?
Thanks for your help and kind regards,
Benjamin
0 commentaires
Réponses (1)
  Gouri Chennuru
    
 le 13 Août 2020
        Hi Benjamin,
You can execute zoom functionality using 3 different types of call backs ButtonDownFilter, ActionPreCallback, ActionPostCallback.
You can create callbacks for pre and post-buttonDown events for zoom mode objects to trigger, as follows
h = zoom;
h.ActionPreCallback = @myprecallback;
h.ActionPostCallback = @mypostcallback;
h.Enable = 'on';
%
function myprecallback(obj,evd)
disp('A zoom is about to occur.');
%
function mypostcallback(obj,evd)
disp('A zoom has occured.');
Hope this Helps!
1 commentaire
Voir également
Catégories
				En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

