Contents Previous Next Subchapters

Easy Dialog Spinbox Fields
Syntax easydlg(captionbuttonsmessagelayout)
See Also slider

If a field type in the layout argument is "spinbox", the corresponding field setting contains the lower limit, current value, and upper limit for the field. Each of the values is separated by a comma. The field width must be greater than or equal to the maximum number of characters in the lower and upper limit, plus two.

     caption = "Spinbox_callback"
     buttons = {"Ok", "Cancel"}
     message = { ...
          "The time required is proportional to", ...
          "the maximum number of iterations." ...
     layout = "spinbox, max_itr:, 5, 1, 5, 20"
     easydlg(caption, buttons, message, layout)
     function Spinbox_callback(button) begin
          print "button  =", button
          print "max_itr: =", easydlg("max_itr:")

If you paste the program above into the command line, the following dialog will be displayed:
If you change the spinbox value to 10, and then select the Ok button, the function Spinbox_callback will be called and it will print the text
     button  = Ok
     max itr = 10
in the Command window.