Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

dialog - Create and display empty dialog box

Syntax

h = dialog('PropertyName',PropertyValue,...)

Description

h = dialog('PropertyName',PropertyValue,...) returns a handle to a dialog box. The dialog box is a figure graphics object with properties recommended for dialog boxes. You can specify any valid figure property value except DockControls, which is always off.

The properties that dialog sets and their values are

PropertyValue
'BackingStore''off'
'ButtonDownFcn''if isempty(allchild(gcbf)), close(gcbf), end'
'Colormap'[]
'Color' DefaultUicontrolBackgroundColor
'DockControls''off'
'HandleVisibility''callback'
'IntegerHandle''off'
'InvertHardcopy''off'
'MenuBar''none'
'NumberTitle''off'
'PaperPositionMode''auto'
'Resize''off'
'Visible''on'
'WindowStyle''modal'

The default ButtonDownFcn, if isempty(allchild(gcbf)), close(gcbf), end, causes the dialog to terminate itself when clicked as long as it contains no child objects. Replace it with another callback or an empty callback if you do not want this behavior. You can do this only from a script or function if the dialog is modal (the default WindowStyle).

Any parameter from the figure function is valid for this function.

Examples

out = dialog;
out = dialog('WindowStyle', 'normal', 'Name', 'My Dialog');

See Also

errordlg, helpdlg, inputdlg, listdlg, msgbox, questdlg, warndlg

figure, uiwait, uiresume

Predefined Dialog Boxes for related functions

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS