MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelský manuál Strana 384

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 500
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 383
1 2 ... 379 380 381 382 383 384 385 386 387 388 389 ... 499 500

Komentáře k této Příručce

Žádné komentáře