User`s guide

Add Components to the GUI
Ifyouwanttosetthepositionorsizeofthecomponenttoanexactvalue,
then modify its
Position property. See “Locate and Move Components” on
page 6-83 and “Resize Components” on page 6-86 for details.
To add an image to a radio button, assign the button’s
CData property
an m-by-n-by-3 array of RGB values that defines a truecolor image. You
must do this programmatically in the opening function o f the GUI code file.
For e xample, the array
img defines a 16-by-24-by-3 truecolor image using
random values between 0 and 1 (generated by
rand).
img = rand(16,24,3);
set(handles.radiobutton1,'CData',im g);
Note To manage exclusive selection of radio buttons and toggle buttons,
put them in a button group. See “Button Group” on page 6-60 for more
information.
Check Box
To create a check box with label Display file extension that is initia lly
checked,asshowninthisfigure:
Specify the check box label by setting the String property to the desired
label, in this case,
Display file extension.
6-45