MATLAB Function Reference |
Syntax
Description
The uiwait
and uiresume
functions block and resume MATLAB program execution.
uiwait
blocks execution until uiresume
is called or the current figure is deleted. This syntax is the same as uiwait(gcf)
.
uiwait(h)
blocks execution until uiresume
is called or the figure h
is deleted.
uiwait(h,timeout)
blocks execution until uiresume
is called, the figure h
is deleted, or timeout
seconds elapse.
uiresume(h)
resumes the M-file execution that uiwait
suspended.
Remarks
When creating a dialog, you should have a uicontrol with a callback that calls uiresume
or a callback that destroys the dialog box. These are the only methods that resume program execution after the uiwait
function blocks execution.
uiwait
is a convenient way to use the waitfor
command. You typically use it in conjunction with a dialog box. It provides a way to block the execution of the M-file that created the dialog, until the user responds to the dialog box. When used in conjunction with a modal dialog, uiwait/uiresume can block the execution of the M-file and restrict user interaction to the dialog only.
See Also
uicontrol
, uimenu
, waitfor
, figure
, dialog
uiputfile | uisave |
© 1994-2005 The MathWorks, Inc.