MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 505

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 504
1 2 ... 500 501 502 503 504 505 506 507 508 509 510 ... 758 759

Commentaires sur ces manuels

Pas de commentaire