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

  • 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 518
Add Components to a Programmatic GUI
The Position property specifies the lo cation and size of the static text
component. In this exam ple, 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. The statement assumes the default value of the
Units property,
which is
pixels.
Toggle Button
The following statement creates a toggle button with handle tbh:
tbh = uicontrol(fh,'Style','toggle button',...
'String','Left/Right Tile',...
'Value',0,'Position',[30 20 100 30]);
The first argument, fh, specifies the handle of the parent figure. You can also
specify the parent as a panel or button group. Use a button group to manage
exclusive selection of radio buttons and toggle buttons. See “Panel” on page
11-35 and “Button Group” on page 11-36 for more information.
The
Style property, togglebutto n, specifies the user interface control as
a toggle button.
The
String property labels the toggle button as Left/Right Tile.Thetoggle
button allows only a single line of text. If you specify more than one line, only
the first line is shown. If you specify a component width that is too sm all to
11-31
Vue de la page 518
1 2 ... 514 515 516 517 518 519 520 521 522 523 524 ... 758 759

Commentaires sur ces manuels

Pas de commentaire