User`s guide

Add Components to a Programmatic GUI
The Str ing property defines the menu items. You can specify the items in
any of the formats shown in the following table.
String Property
Format
Example
Cell array of strings
{'one' 'two' 'three'}
Padded s tring matrix
['one ';'two ';'three']
String vector separated
by vertical slash (|)
characters
['one|two|three']
If you specify a component width that is too small to accommodate one or
more of the specified strings, MATLAB softw are truncates those strings
with an ellipsis.
The
Value property specifies the index of the item that is s elected w hen the
component is created. Set
Value to a scalar that indicates the index of the
selected menu item, where 1 corresponds to the first item in the list. In the
statement, if
Value is 2, the menu looks like this when it is created:
The Po
sition
property specifies the location and size of the pop-up menu. In
this e
xample, the pop-up m enu is 130 pixels wide. It is positioned 30 pixels
from t
heleftofthefigureand80pixelsfromthebottom. Theheightofa
pop-
up menu is determined by the font size; the height you set in the position
vect
or is ignored. The statement assumes the default value of the
Units
prop
erty, which is
pixels.
The
pop up menu does not provide for a labe l. U se a static text component to
lab
el the p op-up menu.
11-23