MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Specifikace Strana 115

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 180
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 114
Designing for Cross-Platform Compatibility
4-15
Designing for Cross-Platform Compatibility
You can use specific property settings to create a GUI that behaves more
consistently when run on different platforms:
Use the default font (uicontrol
FontName property).
Use the default background color (uicontrol
BackgroundColor property).
Use figure character units (figure
Units property).
Using the Default System Font
By default, uicontrols use the default font for the platform on which they are
running. For example, when displaying your GUI on PCs, uicontrols uses MS
San Serif. When your GUI runs on a different platform, it uses that computer’s
default font. This provides a consistent look with respect to your GUI and other
application GUIs.
If you have set the
FontName property to a named font and want to return to
the default value, you can set the property to the string
default. This ensures
MATLAB uses the system default at runtime.
From within the application M-file, use the set command. For example, if there
is a push button in your GUI and its handle is stored in the
pushbutton1 field
of the
handles structure, then the statement,
set(handles.pushbutton1,'FontName','default')
sets the FontName property to use the system default. You can also use the
Property Inspector to set this property:
Zobrazit stránku 114
1 2 ... 110 111 112 113 114 115 116 117 118 119 120 ... 179 180

Komentáře k této Příručce

Žádné komentáře