about summary refs log tree commit diff stats
path: root/cbutton.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'cbutton.lisp')
-rw-r--r--cbutton.lisp18
1 files changed, 18 insertions, 0 deletions
diff --git a/cbutton.lisp b/cbutton.lisp
new file mode 100644
index 0000000..d94052b
--- /dev/null
+++ b/cbutton.lisp
@@ -0,0 +1,18 @@
+(ql:quickload "ltk")
+(defpackage :cbutton
+  (:use :common-lisp :ltk)
+  (:export #:main))
+
+(in-package :cbutton)
+
+(defun main ()
+  (setf *debug-tk* nil)
+  (with-ltk ()
+    (wm-title *tk* "Test1")
+    (let ((b (make-instance 'button
+			    :master nil
+			    :text "Push here"
+			    :command (lambda ()
+				       (format *standard-output* "Pushbutton activated; normal termination.~%")
+				       (setf *exit-mainloop* t)))))
+      (pack b))))