MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guía de usuario Pagina 372

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 759
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 371
9 Managing and Sh aring Application Data in GUIDE
You cannot close the Co lo r Pale tte and Tool P a lette windows by directly
clicking their close button (X).
In the next example, you set the output of Icon Editor to be the
CData of the
icon. The opening f unction for Icon Editor, with
uiwait, contains this code:
% in Icon E dito r
function gui de_i coneditor_OpeningFcn(hO bject, eventdata, . ..
handles, varar gin)
.
.
.
handles.colorPalette = guide_co lorpalette();
handles.toolPalette = guide_too lpalette('iconEditor', hObject);
.
.
.
% Update handles structure
guidata(hObject, handles);
uiwait(hObject);
As a result, you must call uiresume on each exit path:
% in Icon E dito r
function but tonO K_Callback(hObject, eventdata, handles)
uiresume(handles.figure);
function but tonC ancel_Callback(hObject, eventdata, handles)
% Make sure the return data will be empty if we cancelled
handles.mIconCData =[];
guidata(handles.figure, handles);
uiresume(handles.figure);
function Ico n Editor_CloseRequestFc n(hO bject, eventdata, h andles)
uiresume(hObject);
To ensure that the Color Palette is not closed any other w ay, override its
closerequestfcn to take no action:
% in colorPalette
9-42
Vista de pagina 371
1 2 ... 367 368 369 370 371 372 373 374 375 376 377 ... 758 759

Comentarios a estos manuales

Sin comentarios