Create a checkbox

checkbox text size
(checkbox text size state)

Creates a checkbox in the graphics output window. Text is used as a caption. Size is a two- or four-element collection; 1st and 2nd element is the position with respect to the left and top borders of the window, respectively; 3rd and 4th element (if present) is the width and the height of the checkbox, respectively. Size and location are given in pixels and do not depend on the drawing scales.
Initial state can be passed as an optional argument. You can read the current state with checked? and getvalue instructions and set it with setvalue.


"c := checkbox "Option {30 20}
setonchange :c [print checked? :c]



See also:

Table of Content