|
Contents | Previous | Next | Subchapters |
| Syntax |
easydlg(caption, buttons, message, layout, connection)
|
| See Also | show , hide |
"enable",
it specifies an enable connection.
A row corresponding to an enable connection has the form:
enable, FC, F1, F2, ...
where FC denotes the name of a check box and
F1, F2, ..., denote the names corresponding
to other fields in the dialog.
If the field that is named FC, is true,
the fields named
F1, F2, ...,
are input enabled.
Otherwise, the fields named
F1, F2, ...,
are input disabled;
i.e., they are grayed out and the user cannot change their values.
clear
cap = "Enable_callback"
but = {"Ok", "Cancel"}
msg = "Choose axis scaling"
lay = { ...
"checkbox, manual, 2, false", ...
"textfield, min, 5, 0", ...
"textfield, max, 5, 0" ...
}
connection = "enable, manual, min, max"
easydlg( cap, but, msg, lay, connection)
function Enable_callback(button) begin
print "button =", button
print "min =", easydlg("min")
print "max =", easydlg("max")
end
min and max fields are grayed out and cannot be changed.
If you set the manual field to true by selecting it,
the min and max fields will be enabled.
If you then set the field named max to 10 and select the Ok button,
the following text will print in the Command window:
button =", Ok
min =", 0
max =", 10