MATLAB Function Reference
  Go to function:
    Search    Help Desk 
questdlg    Examples   See Also

Create and display question dialog box

Syntax

Description

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'.

Example

Create a question dialog asking the user whether to continue a hypothetical operation:

See Also

dialog, errordlg, helpdlg, inputdlg, msgbox, warndlg



[ Previous | Help Desk | Next ]