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

  • 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 383
10 Lay Out a Programmatic UI
10-52
A syntax for the align function is
align(HandleList,'HorizontalAlignment','VerticalAlignment')
The following table lists the possible values for these parameters.
HorizontalAlignment VerticalAlignment
None, Left, Center, Right, Distribute,
or Fixed
None, Top, Middle, Bottom, Distribute,
or Fixed
All handles in HandleList must have the same parent. See the align reference page
for information about other syntaxes.
The align function positions components with respect to their bounding box, shown as a
blue dashed line in the following figures. For demonstration purposes, create three push
buttons in arbitrary places using the following code.
fh = figure('Position',[400 300 300 150])
b1 = uicontrol(fh,'Position',[30 10 60 30],'String','B1');
b2 = uicontrol(fh,'Position',[50 50 60 30],'String','B2');
b3 = uicontrol(fh,'Position',[10 80 60 30],'String','B3');
Note: Each of the three following align examples starts with these unaligned push
buttons and repositions them in different ways. In practice, when you create buttons with
Vue de la page 383
1 2 ... 379 380 381 382 383 384 385 386 387 388 389 ... 499 500

Commentaires sur ces manuels

Pas de commentaire