MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 367

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 366
1 2 ... 362 363 364 365 366 367 368 369 370 371 372 ... 758 759

Commentaires sur ces manuels

Pas de commentaire