MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelská příručka Strana 552

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 759
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 551
11 Lay Out a Programmatic GUI
Generate Code to Set Component Properties
The techniques described in the preceding s ections set properties of
components interactively. However, you still need to create code in your GUI
code file to enter the property values. The usual way to obtain the prope rty
values is by typing a
get command, such as:
get(object_handle,'String')
ans =
'Generate Dat a'
Then copy the string get returned and paste it into a set statement you have
partially typed in your GUI code f ile:
set(object_handle,'String', 'Generate Data')
You can automate this process by running a helper function that generates
set commands for components, propertie s, and values that you specify as
arguments. You can find the function, called
setprop, in th e folder in the
11-64
Zobrazit stránku 551
1 2 ... 547 548 549 550 551 552 553 554 555 556 557 ... 758 759

Komentáře k této Příručce

Žádné komentáře