MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Betriebsanweisung Seite 538

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 759
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 537
1 2 ... 533 534 535 536 537 538 539 540 541 542 543 ... 758 759

Kommentare zu diesen Handbüchern

Keine Kommentare