MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guida Utente Pagina 549

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 759
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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
Vedere la pagina 548
1 2 ... 544 545 546 547 548 549 550 551 552 553 554 ... 758 759

Commenti su questo manuale

Nessun commento