Contents Previous Next Subchapters

Easy Dialog Dismiss Option
Syntax easydlg(option)
See Also delwin

Description
If there is only one argument to easydlg, and it begins with the text
     "dismiss, "
it is an Dismiss option. This option has the following form
     "dismiss, 
button1button2...
where button1button2... are the names of buttons in the currently displayed dialog (which was created by easydlg). Normally a dialog created by easydlg is dismissed when any of the buttons is chosen. The result of this option is to only dismiss the dialog if one of the specified buttons is chosen.

Program
     clear
     caption = "Dismiss Option"
     buttons = {"Go", "Done"}
     message = "Read the specified file."
     layout = ...
     "textfield, File, 12, \omwin\temp.dat"
     easydlg(caption, buttons, message, layout)
     easydlg("dismiss, Done")
     function Dismiss_Option(button) begin
          print "button =", button
          print "File   =", easydlg("File")
     end

Example
If you paste the program above into the command line, the following dialog will be displayed:
If you then select the Ok button, the dialog will remain on the screen, the function Disable_Option will be called and it will print the text
     button = Go
     File   = \omwin\temp.dat
in the Command window. If you select the Exit button, the dialog will be dismissed from the screen, the function Disable_Option will be called and it will print the text
     button = Done
     File   = \omwin\temp.dat
in the Command window.