User`s guide

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