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

  • 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 308
Add Code for Components in C allbacks
set(buttons(1),'FontSize',newFontSi ze); % Resize the first button
% Do not resize the other button for compa rison
This code adjusts the size of one of the buttons label (in this instance, the
bottom one) when the figure resizes. It computes
newFontSize as the
ratio of the panel’s current size to its original size (expressed in points)
multiplied by the original b u tton
fontSize, 10 points. Then it sets one of
the button’s
fontSize to that value.
5 When you run the GUI, it looks like the previous figure. When you resize it
to be smaller or larger, the text of one of the buttons shrinks or grows, as
shown in the follow in g illustration.
When
you click either button, the GUI and the buttons returns to their
orig
inal size. Because all
Units are normalized,noothercodefor
prop
ortional resizing is needed.
8-41
Vue de la page 308
1 2 ... 304 305 306 307 308 309 310 311 312 313 314 ... 758 759

Commentaires sur ces manuels

Pas de commentaire