Lisp HUG Maillist Archive

display-pane with scroll when needed? (like editor-pane)

I'd like to display lines of text in a window and have the window 
display scroll bars only when the text exceeds the current window limits.

editor-pane acts like this, but it seems like overkill for just 
displaying lines of text which is what I thought display-pane was for. 
But display-pane behaves differently - it expands to contain text.  Is 
there some way to make display-pane handle scrolling like editor-pane or 
a different CAPI element?  Thank you.

Mitch

Here is an example of each.

(setf ed1 (capi:contain
           (make-instance
            'capi:editor-pane
            :text (format nil "One~%Line~%At~%A~%Time...")
            :visible-min-height '(:character 2))))

(setq disp (capi:contain
           (make-instance
            'capi:display-pane
            :text '("One" "Line" "At" "A" "Time...")
            :visible-min-height '(:character 2))))


Re: display-pane with scroll when needed? (like editor-pane)


> (setq disp (capi:contain
>           (make-instance
>            'capi:display-pane
>            :text '("One" "Line" "At" "A" "Time...")
>            :visible-min-height '(:character 2))))

(setq disp (capi:contain
           (make-instance
            'capi:display-pane
            :text '("One" "Line" "At" "A" "Time..." "1" "2" "3" "4")
            :visible-min-height '(:character 5)
            :vertical-scroll t)))

does it for me on Mac OS X.

Jens


Updated at: 2020-12-10 08:42 UTC