|
Contents | Previous | Next | Subchapters |
| Syntax |
easydlg(caption, buttons, message, layout) |
| See Also | pushbutton , addlabel |
"labelbutton",
the corresponding
field setting
is the value for the field.
It can be any sequence of characters not containing a semicolon.
The user will be not be able to change this value directly
but the button for the value may lead to a sequence of operations
that does change the value.
clear
File = "temp.oms"
caption = "Label Button"
buttons = {"Ok", "Cancel"}
message = "Read the specified file"
layout = ["labelbutton, File, 15,", File]
easydlg(caption, buttons, message, layout)
function Label_Button(button) begin
global File
print "button =", button
print "File =", File
if button == "Ok" then return
if button == "Cancel" then return
caption = "Read"
File = openfile(caption, File)
print "File =", File
end
Label_Button will be called and it will print the text
button = File
File = temp.mat
in the Command window.
The program will then display the system dialog that
is used for selecting files.
If you then select the autoexec.oms file in the
c:\omwin directory the following text will print in the Command window:
File = c:\omwin\autoexec.oms