MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelský manuál Strana 274

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 330
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 273
10 Examples of GUIDE GUIs
10-50
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
9 After these comments, add the following code:
% Get the current position of the GUI from the handles structure
% to pass to the modal dialog.
pos_size = get(handles.figure1,'Position');
% Call modaldlg with the argument 'Position'.
user_response = modaldlg('Title','Confirm Close');
switch user_response
case {'No'}
% take no action
case 'Yes'
% Prepare to close GUI application window
% .
% .
% .
delete(handles.figure1)
end
Running the GUI with the Close Button
Run the GUI with the Close button by clicking the Run button on the Layout
Editor toolbar. The GUI appears as in the following figure:
When you click the
Close button on the GUI, the modal dialog appears as
shown in the following figure:
Zobrazit stránku 273
1 2 ... 269 270 271 272 273 274 275 276 277 278 279 ... 329 330

Komentáře k této Příručce

Žádné komentáře