MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelská příručka Strana 549

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 759
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 548
Compose and Code GUIs with Interactive Tools
of colors. The uisetcolor function opens a GUI that returns color values
you can plug into components when you create them or later, by using
set.
For example, the statement:
set(object_handle,'BackgroundColor',uis etcolor)
opens a color selector G U I for you to choose a color. When you click OK,it
returns an RGB color vector that
set assigns immediately. You get an error if
the object does n ot have a property with the specified name or if the specified
property does not accept RGB color 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)
When you execute the statement, first getrect executes to let you set a
position using
rbbox. When you release the mouse button, the u isetcolor
GUI opens for you to specify a background color.
11-61
Zobrazit stránku 548
1 2 ... 544 545 546 547 548 549 550 551 552 553 554 ... 758 759

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

Žádné komentáře