[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scroller Problems



I have a problem with nested scrolling views. The following code creates
a window which contains a scroller. The scroller in turn contains a
vertically scrolling sequence-dialog-item. Scrolling the
sequence-dialog-item overwrites the horizontal scroll bar of the
scroller (i.e. the sequence-dialog-item is drawn outside of its
container).

Am I missing something?


(require :scrollers)

(defclass test-window (window)
  ((scroller :accessor window-scroller)))

(defmethod initialize-instance :after ((window test-window) &key)
  (with-accessors ((scroller window-scroller)) window
    (setf scroller (initialize-scroller window))
    (add-subviews scroller (initialize-table window))))

(defmethod initialize-scroller ((window test-window))
  (make-instance 'ccl::scroller
                 :view-container window
                 :view-size (subtract-points
                             (view-size window) #@(15 15))))

(defmethod initialize-table ((window test-window))
  (make-instance 'sequence-dialog-item
                 :table-sequence (loop for i from 5555 to 5655
                                       collect (format nil "~r" i))
                 :table-hscrollp nil))

(window-show
 (setq *test-window*
       (make-instance 'test-window :view-size #@(300 300))))


Thanks,
Kevin