User`s guide

11 Lay Out a Programmatic GUI
cbh = uicontrol(fh,'Style','checkb ox',...
'String','Display file extension ',...
'Value',1,'Position',[30 20 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, checkbox, specifies the user interface control as a check
box.
The
String property labels the check box as Display file extension.The
check box accommodates only a single line of text. If you specify a component
width that is too sm all to accommodate the specified
String,MATLAB
software truncates the string with an ellipsis.
The Va lue property specifies w hether the box is checked. Set Value to the
value of the
Max property (default is 1) to create the component with the
box checked. Set
Value to Min (default is 0) to leave the box unchecked.
Correspondingly, when the user clicks the check box, MATLAB softw a re
sets
Value to Max when the user checks the box and to Min when the user
unchecks it.
The
Position property specifies the location and size of the list box. In this
example, the list box is 130 pixels wide and 20 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.
11-16