Contents Previous Next Subchapters

Easy Dialog Disable Option
Syntax easydlg(option)
See Also easydlg_disable , hide

If there is only one argument to easydlg, and it begins with the text
     "disable, "
it is an Disable option. This option has the following form
     disable, 
name1name2...
where name1name2... are the names of fields in the currently displayed dialog (which was created by easydlg). The result of this option is to disable user input to each of the specified fields.

Program
     clear
     caption = "Disable Option"
     buttons = {"Ok", "Cancel"}
     message = "Read the specified file."
     layout = { ...
          "textfield, File, 12, \omwin\temp.dat", ...
          "checkbox, Binary, 2, false" ...
     }
     easydlg(caption, buttons, message, layout)
     easydlg("disable, Binary")
     function Disable_Option(button) begin
          print "button =", button
          print "File   =", easydlg("File")
          print "Binary =", easydlg("Binary")
     end

Example
If you paste the program above into the command line, the following dialog will be displayed:
Note that Binary is grey and you cannot change the value of the check box. If you then select the Ok button, the function Disable_Option will be called and it will print the text
     button = Ok
     File   = \omwin\temp.dat
     Binary = false
in the Command window.