MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuel d'utilisateur Page 348

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 500
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 347
10 Lay Out a Programmatic UI
10-16
The first uicontrol argument, f, specifies the parent container. In this case, the parent
is a figure, but you can also specify the parent to be any container, such as a panel or
button group.
The name-value pair arguments, 'Style','text' specify the uicontrol to be static text.
'String','Select a set' specifys the text that displays. If you specify a component
width that is too small to accommodate the specified String, MATLAB wraps the string.
'Position',[30 50 130 30] specifies the location and size of the static text. In this
example, the static text is 130 pixels wide and 20 high. It is positioned 30 pixels from the
left of the figure and 50 pixels from the bottom.
Editable Text Field
This code creates an editable text field, txtbox:
f = figure;
txtbox = uicontrol(f,'Style','edit',...
'String','Enter your name here.',...
'Position',[30 50 130 20]);
The first uicontrol argument, f, specifies the parent container. In this case, the parent
is a figure, but you can also specify the parent to be any container, such as a panel or
button group.
The name-value pair arguments, 'Style','edit', specify the style of the uicontrol to
be an editable text field.
Vue de la page 347
1 2 ... 343 344 345 346 347 348 349 350 351 352 353 ... 499 500

Commentaires sur ces manuels

Pas de commentaire