MATLAB Functions | Help Desk |
questdlg
Create and display question dialog boxbutton = questdlg('qstring
') button = questdlg('qstring
','title
') button = questdlg('qstring
','title
','default
') button = questdlg('qstring
','title
','str1
','str2
','default
') button = questdlg('qstring
','title
','str1
','str2
','str3
','default
')
button = questdlg('qstring
')
displays a modal dialog presenting the question '
qstring
'
. The dialog has three default buttons--No, Cancel, and Yes. '
qstring
'
is a cell array or a string that automatically wraps to fit within the dialog box. button
contains the name of the button pressed.
button = questdlg('qstring
','title
')
displays a question dialog with '
title
'
displayed in the dialog's title bar.
button = questdlg('qstring
','title
','default
')
specifies which push button is the default in the event that the Return key is pressed. '
default
'
must be 'Yes'
, 'No'
, or 'Cancel'
.
button = questdlg('qstring
','title
','str1
','str2
','default
'
)
creates a question dialog box with two push buttons labeled '
str1
'
and '
str2
'
. '
default
'
specifies the default button selection and must be '
str1
'
or '
str2
'
.
button =
questdlg('qstring
','title
','str1
','str2
','str3
','default
'
)
creates a question dialog box with three push buttons labeled '
str1
'
, '
str2
'
, and '
str3
'
. 'default
'
specifies the default button selection and must be '
str1
'
, '
str2
'
, or '
str3
'
.
Create a question dialog asking the user whether to continue a hypothetical operation
button=questdlg('Do you want to continue?','Continue Operation', ... 'Yes','No','Help','No'); ifstrcmp
(buttonName,'Yes'),disp
('Creating file'); elseif strcmp(buttonName,'No'), disp('Cancelled file operation') elseif strcmp(buttonName,'Help'), disp('Sorry, no help available'); end
dialog
, errordlg
, helpdlg
, inputdlg
, msgbox
, warndlg