Re: capi scrolling & scroll-bars

"Alexey Veretennikov (as alexey dot veretennikov at protonmail dot com)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <VYULoqBAkTg_KxdBM-bbqyD37m0978N-L4KWAKKvT3EHqlO96eIyrba_YHIXrFOoV-6XKl9WodBSipdu1NRUguMKcIdn0spYnkmiEI1Bjvs=@protonmail.com>
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))))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.