MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Betriebsanweisung Seite 367

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 759
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 366
Making Multiple GUIs Work Together
.
.
.
% Update handles structure
guidata(hObject, h andles);
Setting the Initial Color on the Color Palette
After you create all three GUIs, you need to set the initial color. When you
invoke the Color Palette from the Icon Editor, the Color Palette passes a
function handle that tells the Icon Editor how to set the initial color. This
function handle is stored in its
handles structure. You can retrieve the
handles structure from the figure to w hich the Color P alette outputs the
handle:
% in colorPalette
function gui de_c olorpalette_OpeningFcn( hObject, ...
eventdata, ha ndle s, varargin)
handles.output = hObject;
.
.
.
% Set the initial palette c olor to black
handles.mSelectedColor = [0 0 0];
% Publish the function setS electedColor
handles.setColor = @setSelectedColor;
.
.
.
% Update handles structure
guidata(hObject, handles);
% in colorPalette
function set Sele ctedColor(hObject, color)
handles = guidata(hObject);
.
.
.
9-37
Seitenansicht 366
1 2 ... 362 363 364 365 366 367 368 369 370 371 372 ... 758 759

Kommentare zu diesen Handbüchern

Keine Kommentare