User`s guide

Add Components to a Programmatic GUI
The Parent
property specifies the handle fh of the parent figure. You can also
specify th
e parent as a panel o r button group.
The
Title
property labels the button group as My Button Grou p.
The state
ment assumes the default
TitlePosition property, which is
lefttop
.
The
Unit
s
property is used to interpret the Position property. This
button
group assume s the default
Units property, normalized.This
enable
s the button group to resize automatically if the figure is resized. See
docume
ntation for the figure property
ResizeFcn for more information about
resizi
ng.
The
Po
sition
property specifies the location and size of the button group. In
this e
xample, the button group is 80 percent of the width of the figure and 60
perc
ent of its height. It is positioned 10 percent of the figure width from the
left
of the figure and 20 percent of the figure height from the bottom. As the
figu
re is resized the button group retains these proportions.
The
following statements add two radio buttons to the button group w ith
han
dle
bgh.
rbh1 = uicontrol(bgh,'Style','radi obutton','String','Red', ...
'Units','normalized',...
11-37