MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manual de usuario Pagina 156

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 330
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 155
6 Laying Out a GUI
6-66
Cross-Platform Compatible Units
Cross-platform compatible GUIs should look correct on computers having
different screen sizes and resolutions. Since the size of a pixel can vary on
different computer displays, using the default figure
Units of pixels does not
produce a GUI that looks the same on all platforms.
For this reason, GUIDE defaults the
Units property for the figure to
characters.
System-Dependent Units
Character units are defined by characters from the default system font. The
width of a character unit equals the width of the letter
x in the system font. The
height of a character unit is the distance between the baselines of two lines of
text. Note that character units are not square.
Units and Resize Behavior
If you set your GUI’s resize behavior using the GUI options, GUIDE
automatically sets the units for the GUI’s components in a way that maintains
the intended look and feel across platforms. To specify the resize behavior
option, select
Options from the Tools menu, then specify Resize behavior by
selecting
Non-resizable, Proportional, or Other (Use ResizeFcn).
If you choose the
Non-resizable option, GUIDE defaults the component units
to
characters. If you choose Proportional, it defaults the component units to
normalized. In either case, these settings enable your GUI to automatically
adjusts the size and relative spacing of components as the GUI displays on
different computers.
If you choose
Other (Use ResizeFcn), GUIDE defaults the component units to
characters. You must provide a ResizeFcn callback to customize the GUI’s
resize behavior.
Note GUIDE does not automatically adjust the component units if you
modify the Resize property programmatically or in the Property Inspector.
At times, it may be convenient to use a more familiar unit of measure, e.g.,
inches or centimeters, when you are laying out the GUI. However, to preserve
the look of your GUI on different computers, remember to change the figure
Vista de pagina 155
1 2 ... 151 152 153 154 155 156 157 158 159 160 161 ... 329 330

Comentarios a estos manuales

Sin comentarios