Contents Previous Next Subchapters

Disable Easy Dialog Fields on True
Syntax easydlg(captionbuttonsmessagelayoutconnection)
See Also easydlg1_disable , hide

Disable Connections
If a row of the connection argument begins with "disable", it specifies an disable connection. A row corresponding to a disable connection has the form:
     disable, 
FCF1F2...
where FC denotes the name of a check box and F1F2..., denote the names corresponding to other fields in the dialog. If the field that is named FC, is true, the fields named F1F2..., are input disabled. Otherwise, the fields named F1F2..., are input enabled; i.e., they are grayed out and the user cannot change their values.

Program
     clear
     cap = "Disable_callback"
     but = {"Ok", "Cancel"}
     msg = "Choose axis scaling"
     lay = { ...
     "checkbox, manual, 2, false", ...
     "textfield, min, 5, 0", ...
     "textfield, max, 5, 0" ...
     }
     connection = "disable, auto, min, max"
     easydlg( cap, but, msg, lay, connection)
     function Disable_callback(button) begin
          print "button =", button
          print "min    =", easydlg("min")
          print "max    =", easydlg("max")
     end

Example
If you paste the program above into the command line, the following dialog will be displayed:
If you set the auto field to true by selecting it, the min and max fields will be disabled and you will not be able to change their values. If you then select the Ok button, the following text will print in the Command window:
     button =", Ok
     min    =", 0
     max    =", 0