Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
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

Respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by