warndlg
Create warning dialog box
Description
Note
In App Designer and apps created with the uifigure
function, uialert
is recommended over
warndlg
because it provides additional
customization options.
f = warndlg(
creates a nonmodal
warning dialog box with the specified message and returns the dialog box figure
object msg
)f
. The message text wraps to fit the dialog box. The
dialog box title is Warning Dialog
.
Use the warndlg
function if you want to show a warning dialog
box over multiple app windows, the MATLAB® desktop, or Simulink® and still be able to interact with them before responding to the
dialog box.
f = warndlg
creates a warning dialog box with a default title
and message, as follows.
Default title:
Warning Dialog
Default message:
This is the default warning.
Examples
Input Arguments
More About
Tips
Modal dialogs (created using
errordlg
,msgbox
, orwarndlg
) replace any existing dialogs created with these functions that also have the same name.MATLAB program execution continues even when a modal Warning dialog box is active. To block program execution until the user closes the dialog box, use the
uiwait
function.To create a modal alert dialog box for single-window App Designer or
uifigure
-based apps, use theuialert
function instead.
Version History
Introduced before R2006a