Re: capi scrolling & scroll-bars
"Paul Werkowski (as pw at snoopy dot qozzy dot com)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
Yes!! Thank you very much. I see the light now. Paul On 1/6/2026 5:45 PM, Alexey Veretennikov wrote: > Hi, > > Give your interface a bit of a width to display scrollbar. Change > :visible-min-width to > :visible-min-width 810 for example. > > (interface > (make-instance 'capi:interface > :title "Albums" > :layout (list layout) > :x 960 > :visible-min-width 810 > :visible-min-height 800 > ))) > > > BR, > /Alexey > > On Tuesday, January 6th, 2026 at 20:39, Paul Werkowski (as pw at > snoopy dot qozzy dot com) <[email protected]> wrote: >> >> >> On 1/6/2026 2:34 PM, David McClain wrote: >>> Hi Paul, >>> >>> None of your code examples made it through… >>> >> ;;;; forgot to include them :( >> >> (in-package ::user) >> >> (defun run-test () >> ;; where is scroll-bar? >> (flet ((draw-thing (pane x y w h) >> (declare (ignorable x y w h)) >> (gp:draw-rectangle pane 10 100 144 144 :foreground :red) >> (gp:draw-rectangle pane 100 750 144 144 :foreground :blue))) >> (let* ((max-h 6336) >> (layout (make-instance >> 'capi:tracking-pinboard-layout >> ;; :description nil ; list of 151 drawn images >> :scroll-height max-h >> :vertical-scroll t >> :visible-min-width 800 >> :visible-min-height (min 800 max-h) >> :display-callback #'draw-thing ; this example only >> )) >> (interface >> (make-instance 'capi:interface >> :title "Albums" >> :layout (list layout) >> :x 960 >> :visible-min-width 750 >> :visible-min-height 800 >> ))) >> (capi:display interface) >> ))) >> >> >> ;;; from LW UG&RM 12.4.1 Ordinary Scrolling >> >> (defun run-example () >> (flet ((my-display-callback (pane x y width height) >> (declare (ignore x width)) >> (format t " y = ~d, height = ~d~%" y height) >> (gp:draw-rectangle pane 0 100 10 10 >> :foreground :green :filled t) >> (gp:draw-rectangle pane 0 400 10 10 >> :foreground :blue :filled t))) >> (let* ((output-pane >> (make-instance >> ;;'capi:output-pane >> 'capi:tracking-pinboard-layout >> :vertical-scroll t >> :scroll-height 600 >> :visible-min-height 300 >> :display-callback #'my-display-callback))) >> (capi:contain output-pane)))) >