(in-package :ltk)
(defun make-button (text width height)
(make-instance
'button
:text
text
:width
width
:height
height
:font "Arial 20"))
(defun calc ()
(with-ltk
()
(let ((buttons (make-array '(3
3))))
(dotimes (x
3)
(dotimes (y
3)
(setf (aref
buttons x y) (make-button (format nil "~d" (+ (* 3 x) y 1)) 3
1))
(grid (aref
buttons x y) x y)))
(grid (make-button "0" 3
1) 3 1)
(grid (make-button "+" 3 3) 1 3
:rowspan 2)
(grid (make-button "-" 3 1) 1
4)
(grid (make-button "*" 3 1) 0
3)
(grid (make-button "/" 3 1) 0
4))))