addlistener does not always trigger on the event when minimizing a figure.

1 vue (au cours des 30 derniers jours)
Tommie Heard
Tommie Heard le 9 Avr 2014
I am trying to add a listener to detect when my main figure has be minimized so I can minimize other figures also. Sometime it works and at times it doesn't.
Here is a snippet of code I have used:
jFrame = get(handle(gcf),'JavaFrame'); fr = jFrame.fHG1Client.getContentPane.getTopLevelAncestor(); addlistener(fr,'Minimized',@(o,e)myminimized_callback(o,e));
function myminimized_callback(o,e) disp('figure has been minimized');
Sometimes it works but not consistently. Can someone tell me what I am doing wrong and give me a snippet of code to try.
Thanks

Réponses (0)

Catégories

En savoir plus sur App Building dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by