Problem with rendering scrolled output-panes in row-layouts
When I run the following code (Mac, current OS) in LW Pro and use the scrollbars to scroll, I get white striping in my colored TEST-PANEs, the more so if I scroll slowly. On the other hand, the text seems to render perfectly. Presumably all the drawing takes place in callbacks. So why is this happening? A second problem is that the BIG-PANE’s vertical scrollbar isn’t displayed unless I’ve scrolled to its right-most edge. (This is a side issue that may come up, but ultimately I want a layout that has a header that does not scroll vertically but does scroll horizontally. Think of a calendar with a list of employees. The employee names should scroll vertically with the days but not horizontally. I understand that ultimately I may have to create my own scrollbars to get the desired behavior. Today I’ll settle for fixing the rendering problem.) Thanks for your help. Laughing Water (defclass test-pane (capi:output-pane) ((value :accessor value :initform (random 1000))) (:default-initargs :display-callback 'draw-test-pane :visible-min-width 100 :visible-max-width 100 :visible-min-height 50)) (defun draw-test-pane (pane x y width height) (gp:with-graphics-state (pane :foreground :light-blue) (gp:draw-rectangle pane 0 0 width height :filled t)) (gp:with-graphics-state (pane :foreground :black) (gp:draw-string pane (format nil "~A" (value pane)) 5 20))) (defun make-test-rows () (loop for i below 50 collect (make-instance 'capi:row-layout :uniform-size-p nil :min-column-width 100 :visible-min-height 50 :visible-max-height 50 :description (loop for d below 7 collect (make-instance 'test-pane))))) (capi:define-interface scroll-test-interface () () (:panes (header capi:title-pane :accessor header :text "I don't want this header to scroll vertically.") (big-pane capi:column-layout :accessor big-pane :description (make-test-rows) :y-gap 3 :uniform-size-p nil :visible-max-height nil :visible-max-width nil :vertical-scroll t)) (:layouts (main-layout capi:column-layout '(header big-pane ) :horizontal-scroll t)) (:default-initargs :title "Scroll Test" :best-width 400 :best-height 240)) (capi:display (make-instance 'scroll-test-interface)) _______________________________________________ Lisp Hug - the mailing list for LispWorks users lisp-hug@lispworks.com http://www.lispworks.com/support/lisp-hug.html