MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Bedienungsanleitung Seite 390

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 500
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 389
10 Lay Out a Programmatic UI
10-58
Set Colors Interactively
Specifying colors for Color, ForegroundColor, BackgroundColor, FontColor, and
plotting object color properties can be difficult without seeing examples of colors. The
uisetcolor function opens a dialog that returns color values you can use to set these
properties. For example, this command opens a dialog that allows the user to choose a
color:
object_handle.BackgroundColor = uisetcolor;
When the user clicks OK, the uisetcolor function returns an RGB values.
You can combine setting position and color into one line of code or one function, for
example:
btn1 = uicontrol('String', 'Button 1',...
'Position',getrect,...
'BackgroundColor',uisetcolor)
Seitenansicht 389
1 2 ... 385 386 387 388 389 390 391 392 393 394 395 ... 499 500

Kommentare zu diesen Handbüchern

Keine Kommentare