MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guida Utente Pagina 368

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 759
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 367
9 Managing and Sh aring Application Data in GUIDE
handles.mSelectedColor =color;
.
.
.
guidata(hObject, handles);
Call the publicized function from the Icon Editor, setting the initial color
to
'red':
% in Icon E dito r
function gui de_i coneditor_OpeningFcn(hO bject, ...
eventdata, ha ndle s, varargin)
.
.
.
handles.colorPalette = guide_co lorpalette('iconEditor' , hObject);
.
.
.
colorPalette = handles.colorPalette;
colorPaletteHandles = guidata(c olorPalette);
colorPaletteHandles.setColor(colorP alette, [1 0 0]);
.
.
.
% Update handles structure
guidata(hObject, handles);
Accessing the Color Palette’s Current Color from the Icon Editor
TheColorPaletteinitializesthecurrentcolordata:
%in colorPalett e
function gui de_c olorpalette_OpeningFcn( hObject, ...
eventdata, ha ndle s, varargin)
handles.output = hObject;
.
.
.
handles.mSelectedColor = [0 0 0];
.
9-38
Vedere la pagina 367
1 2 ... 363 364 365 366 367 368 369 370 371 372 373 ... 758 759

Commenti su questo manuale

Nessun commento