MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guida Utente Pagina 505

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 759
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 504
Add Components to a Programmatic GUI
Note You can also use an image as a label. See “Add an Image to a Push
Button” on page 11-26 for more information.
Edit Text
The following statement creates an edit text component with handle eth:
eth = uicontrol(fh,'Style','edit', ...
'String','Enter your name here. ',...
'Position',[30 50 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, edit, specifies the u ser interface control as an edit text
component.
The
String property defines the text that appears in the component.
To enable multiple-line input,
Max - Min mustbegreaterthan1,asinthe
following statement. MATLAB software wraps the string if necessary.
eth = uicontrol(fh,'Style','edit', ...
'String','Enter your name and address here.',. ..
'Max',2,'Min',0,...
'Position',[30 20 130 80]);
11-17
Vedere la pagina 504
1 2 ... 500 501 502 503 504 505 506 507 508 509 510 ... 758 759

Commenti su questo manuale

Nessun commento