guide - interrupt ongoing callback and switch to correct callback when user clicks another button
Mostrar comentarios más antiguos
I am creating a GUI to draw shapes on a figure with different kind of shapes (ellipse, polygone,...) and different shape fillings (black, white,...). I separated shapes and filling in two group buttons each containing the options. When the user clicks on one type of filling and starts drawing on the figure it works. But when the user decides to change the shape it does not work. How can I interrupt the ongoing callback as soon as the user decides to use another tool and start the new callback? In other words, how to know at each moment the status of all the buttons and do the callback accordingly? I am a bit lost with the options I have: interruptible, busy action, waitfor, drawnow. Suggestions welcome. Thanks.
Respuestas (1)
Sean de Wolski
el 10 de Jun. de 2011
One thought: use timers and stop the timer when the second button is pushed.
doc timer
doc start
doc stop
Categorías
Más información sobre App Building 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!