MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelská příručka Strana 538

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 759
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 537
11 Lay Out a Programmatic GUI
set(object_handle,'Position',rect)
set(object_handle,'Units',myunits)
else
rect = [];
end
clipboard('copy', rect) % Place set string on system
% clipboard as well as returning it
The setpos function uses figure units to set the com ponent Position
property. First, setpos gets and saves the Units property of the component,
and sets that property to f igure units. After setting the object position, the
function restores the original units of the object.
The following steps show how to use
setpos to reposition a button away from
its default position:
1 Put this statement into your GUI code file, and then execute it:
btn1 = uicontrol('Style','pushbutt on',...
'String','Push Me');
2 Put the following statement in your GUI code file, execute it, and then
drag out a P osition for object
btn1.
rect = setpos(btn1)
11-50
Zobrazit stránku 537
1 2 ... 533 534 535 536 537 538 539 540 541 542 543 ... 758 759

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

Žádné komentáře