User`s guide

11 Lay Out a Programmatic GUI
Instead of d esignating a font yourself, you could provide a push button or
context menu in your GUI that allows users to select fonts themselves via the
uisetfont GUI. The callback for the feature could be
font = uisetfont;
set(eth,'font')
where eth is the handle for the edit b ox whose font the user is setting. You
can store the handle in the figure’s
AppData and retrieve it with getappdata.
List Box
The following statement creates a list box with handle lbh:
lbh = uicontrol(fh,'Style','listbo x',...
'String',{'one','two','three','four' },...
'Value',1,'Position',[30 80 130 20]);
The first argument, fh, specifies the handle of the parent figure. You can also
specify the parent as a panel or button group. See “Panel” o n page 11-35 and
“Button Group” on page 11-36 for more information.
The
Style property, lis tbox , specifies the user interface control a s a list box.
The
String property defines the list items. You can specify the items in a ny
of the formats shown in the following table.
11-20