MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Podręcznik Użytkownika Strona 159

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 759
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 158
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
Przeglądanie stron 158
1 2 ... 154 155 156 157 158 159 160 161 162 163 164 ... 758 759

Komentarze do niniejszej Instrukcji

Brak uwag