User`s guide

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