| Creating Graphical User Interfaces | ![]() |
Event Processing During Callback Execution
The following sequence describes how MATLAB processes events while a callback executes:
drawnow, figure, getframe, pause, or waitfor command in the callback routine, MATLAB suspends execution and begins processing the event queue.
drawnow, figure, getframe, pause, or waitfor command, MATLAB repeats these steps for the remaining events in the queue.
BusyAction property of the object that generated the event.
BusyAction is queue, MATLAB leaves the event in the event queue.
BusyAction is cancel, MATLAB discards the event.
This process continues until the callback completes execution. When MATLAB returns the prompt to the command window, all events have been processed.
| Controlling Interruptibility | Controlling Figure Window Behavior | ![]() |