User`s guide
11 Lay Out a Programmatic GUI
If the list box is not large enough to display all list entries, you can set the
ListBoxTop property to the index of the item y ou w ant to appear at the top
when the component is created.
The
Position property specifies the location and size of the list box. In this
example, the list box is 130 pixels wide and 80 high. It is positioned 30 pixels
from the left of the figure and 20 pixels from the bottom. The statement
assumes the default value of the
Units property, which is pixels.
The list box does not provide for a label. Use a static text component to label
the list box.
Pop-Up Menu
The following statement creates a pop-up menu (also know n as a drop-down
menu or combo box) with handle
pmh:
pmh = uicontrol(fh,'Style','popupm enu',...
'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, popupmenu, specifies the user interface control as a
pop-up menu.
11-22