User`s guide

Add Components to a Programmatic GUI
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 item or items that are selected when the
component is created. To select a single item, set
Value to a scalar that
indicates the index of the selected list item, where 1 corresponds to the f irst
item in the list.
To select more than one item, set
Value to a vector of indices of the selected
items. To enable selection of more than one item,
Max - Min must be greater
than 1, as in the following statement:
lbh = uicontrol(fh,'Style','listbo x',...
'String',{'one','two','three','four' },...
'Max',2,'Min',0,'Value',[1 3],,...
'Position',[30 20 130 80]);
If you want no initial selection:
1 Set the Max and Min properties to e nable multiple selection
2 Set the Value property to an empty matrix [].
11-21