MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guía de usuario Pagina 505

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 759
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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
Vista de pagina 504
1 2 ... 500 501 502 503 504 505 506 507 508 509 510 ... 758 759

Comentarios a estos manuales

Sin comentarios