MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manual do Utilizador Página 384

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 500
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 383
1 2 ... 379 380 381 382 383 384 385 386 387 388 389 ... 499 500

Comentários a estes Manuais

Sem comentários