diff --git a/tutorial/09-tutorial.lisp b/tutorial/09-tutorial.lisp index 09e3428..6eefeec 100644 --- a/tutorial/09-tutorial.lisp +++ b/tutorial/09-tutorial.lisp @@ -5,7 +5,8 @@ (in-package :clog-user) (defun on-new-window (body) - (let* ((t1 (create-button body :content "Tab1")) + (let* (last-tab + (t1 (create-button body :content "Tab1")) (t2 (create-button body :content "Tab2")) (t3 (create-button body :content "Tab3")) (p1 (create-div body :content "Panel1 - Type here")) @@ -13,7 +14,7 @@ (p3 (create-div body :content "Panel3 - Type here"))) (place-after t3 (create-br body)) - + (setf (width p1) 600) (setf (width p2) 600) (setf (width p3) 600) @@ -34,16 +35,26 @@ (setf (hiddenp p1) t) (setf (hiddenp p2) t) (setf (hiddenp p3) t) + + (setf (background-color t1) :grey) + (setf (background-color t2) :grey) + (setf (background-color t3) :grey) + + (setf (background-color last-tab) :lightblue) (setf (hiddenp obj) nil) (focus obj))) + (setf last-tab t1) (select-tab p1) (set-on-click t1 (lambda (obj) + (setf last-tab obj) (select-tab p1))) (set-on-click t2 (lambda (obj) + (setf last-tab obj) (select-tab p2))) (set-on-click t3 (lambda (obj) + (setf last-tab obj) (select-tab p3)))))) (defun start-tutorial ()