[ltk-user] Scale command option help

Peter Santiago Peter.J.Santiago at gmail.com
Mon Feb 23 15:11:00 UTC 2009


Hello, I was wondering if someone could tell me where I'm going wrong in my
code:

(defun nomogui ()
  (with-ltk ()
    (let* ((s0 (make-instance 'scale
                  :label "X-ri"
                  :digits 6
                  :orientation 'horizontal
                  :troughcolor "#000099"
                  :resolution .001
                  :from 1.4
                  :to 1.6)))

      (configure s0 :command
         (lambda (val)
           (print 'hello)
           (if (< 1.5 val)
               (configure s0 :troughcolor "#990000")
               (configure s0 :troughcolor "#009900"))))
      (pack s0))))

Basically I just want to be able to change the troughcolor of the scale
based on its value. Any help?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ltk-user/attachments/20090223/9ed7001c/attachment.html>


More information about the ltk-user mailing list