tab highlighting

This commit is contained in:
David Botton 2021-01-11 18:30:01 -05:00
parent 42c336a501
commit d864468524

View file

@ -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"))
@ -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 ()