MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Especificações Página 140

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 180
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 139
5 Application Examples
5-16
uiresume(handles.figure1);
function varargout = yesButton_Callback(h, eventdata, handles, varargin)
handles.answer = 'yes';
guidata(h,handles);
uiresume(handles.figure1);
Protecting the GUI with a Close Request Function
Whenever a user closes a figure, MATLAB first executes the figure’s close
request function, as defined by the
CloseRequestFcn figure property. The
default close request function simply deletes the figure. However, a GUI may
want to protect the user from unintentionally deleting a figure if they click on
the
X in the close box of the window border.You can change the default close
request function by redefining the figure’s
CloseRequesFcn.
The “The Close Button Callback” section shows a callback for the GUI’s
Close
button that you could also use as a close request function. To add the new close
request function to your application M-file, select the figure in the Layout
Editor and right click to display the context menu.
Vista de página 139
1 2 ... 135 136 137 138 139 140 141 142 143 144 145 ... 179 180

Comentários a estes Manuais

Sem comentários