(App Designer) Create UI figure window
Use only for creating App Designer apps. GUIDE creates apps in traditional figures. For details, see Graphics Support in App Designer.
fig = uifigure
fig = uifigure(Name,Value)
fig = uifigure;
Create a UI figure with a specific title.
fig = uifigure('Name','Plotted Results');
Position property value.
p = fig.Position
ans = 680 678 560 420
to open a modal Confirmation dialog box when the user tries to close
Copy and paste this code into the MATLAB® Editor,
and then run
function closeFig fig = uifigure('Position',[100 100 350 275],... 'CloseRequestFcn',@(fig, event) my_closereq(fig)); end function my_closereq(fig) selection = questdlg('Close the figure window?',... 'Confirmation',... 'Yes','No','Yes'); switch selection, case 'Yes', delete(fig) case 'No' return end end
Click the figure close button. The Confirmation dialog box opens.
Specify optional comma-separated pairs of
Name is the argument
Value is the corresponding
Name must appear
inside single quotes (
You can specify several name and value pair
arguments in any order as
My Appas the title of the UI figure.
The properties listed here are a subset of the available properties. For the full list, see UI Figure Properties.
''(default) | character vector
Title, specified as a character vector.
'Position'— Location and size of UI figure, excluding borders and title bar
[left bottom width height]
Location and size of the UI figure, excluding borders and title
bar, specified as a four-element vector of the form
bottom width height].
This table describes each element in the vector.
|Distance from the left edge of the primary display to the inner left edge of the UI figure window. This value can be negative on systems that have more than one monitor.|
|Distance from the bottom edge of the primary display to the inner bottom edge of the UI figure window. This value can be negative on systems that have more than one monitor.|
|Distance between the right and left inner edges of the UI figure.|
|Distance between the top and bottom inner edges of the UI figure.|