Creating Graphical User Interfaces Previous page   Next Page

How the GUI and Dialog Work

This section describes what occurs when you click the Close button on the GUI:

  1. User clicks the Close button. Its callback then
  2. The modal dialog opens with the 'Position' obtained from the GUI that calls it.
  3. The opening function in the modal dialog M-file:
  4. When a user clicks one of the two push buttons, the callback for the push button
  5. The output function is called, which returns the string Yes or No as an output argument, and deletes the dialog with the command
  1. delete(handles.figure1)

  1. When the GUI with the Close button regains control, it receives the string Yes or No. If the answer is 'No', it does nothing. If the answer is 'Yes', the close button callback closes the GUI with the command
  1. delete(handles.figure1)


Previous page  Running the GUI with the Close Button GUI Applications Next page

© 1994-2005 The MathWorks, Inc.