10 Lay Out a Programmatic UI
calling inputdlg, which is a dialog that allows you to enter text strings. Here is an
example that creates static text and sets the font properties.
f = figure('Position',[300 300 385 285]);
txt1 = uicontrol(f,...
'Style','text',...
'String',inputdlg('String','Static Text'),...
uisetfont,'Position',[50 200 150 40]);
The inputdlg dialog box appears first.
After you enter a string and click OK, the uisetfont dialog box opens for you to set font
characteristics for displaying the string.