A Chez Scheme Interface to the Tk GUI Toolkit
Minor modification of (rebottled pstk)
to work with Chez Scheme.
chez-tk
requires Tcl/Tk. The program tclsh
is used by default, but tk-start
takes an optional second argument to specify an alternative program, e.g., tclkit
. chez-tk
has only been tested on Linux.
$ akku install chez-tk
For more information on getting started with Akku, see this blog post.
Below is a simple example that will display Hello world
in the REPL when the button is clicked.
(import (chez-tk))
(define tk (tk-start))
(tk/pack
(tk 'create-widget 'button 'text: "Hello"
'command: (lambda () (display "Hello world") (newline)))
'padx: 20 'pady: 20)
(tk-event-loop tk)
See here for more examples that work with chez-tk
. (rebottled pstk)
has detailed documentation that also applies to chez-tk
.