stk/Demos/Widget/Wdialog1.stklos

19 lines
803 B
Plaintext

;;;;
;;;; STk adaptation of the Tk widget demo.
;;;;
;;;; This demonstration script creates a dialog box with a local grab.
;;;;
(define (demo-dialog1)
(STk:make-dialog :title "Dialog with local grab"
:text "This is a modal dialog box. It uses Tk's \"grab\" command to create a \"local grab\" on the dialog box. The grab prevents any pointer-related events from getting to any other windows in the application until you have answered the dialog by invoking one of the buttons below. However, you can still interact with other applications."
:bitmap "info"
:default 0
:grab #t
:buttons
`(("OK" ,(lambda () (display "You pressed OK\n")))
("Cancel" ,(lambda () (display "You pressed Cancel\n")))
("See Code" ,(lambda () (show-code "dialog1"))))))