MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 538

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 537
1 2 ... 533 534 535 536 537 538 539 540 541 542 543 ... 758 759

Commentaires sur ces manuels

Pas de commentaire