MATLAB Creating Graphical User Interfaces

(ff) #1

  • If the running callback contains one of these commands, then MATLAB stops the
    execution of the running callback and executes the interrupting callback. MATLAB
    resumes executing the running callback when the interrupting callback completes.

  • If the running callback does not contain one of these commands, then MATLAB
    finishes executing the callback without interruption.


For more details about the interruptible property and its effects, see the Interruptible
property description on the Uicontrol page.


Example


This example shows how to control callback interruption using the Interruptible and
BusyAction properties and a wait bar.


Copy the Source File


1 In MATLAB, set your current folder to one in which you have write access.


2 Execute this MATLAB command:
copyfile(fullfile(docroot,
'techdoc','creating_guis','examples',...
'callback_interrupt.m')),fileattrib('callback_interrupt.m',
'+w');


Run the Example Code


Execute the command, callback_interrupt. The program displays two windows.


Interrupt Callback Execution
Free download pdf