Lisp HUG Maillist Archive

Unexpected behaviour of capi:static-layout

Hi LispWorkers,

It seems that instances of the static-layout class do not behave as I might
expect. Consider the following example:

(capi:contain
  (make-instance 'capi:column-layout
    :description
      (list
        (make-instance 'capi:output-pane :background :red)
        (make-instance 'capi:pinboard-layout
          :description
            (list (make-instance 'capi:text-input-pane
                    :x 20 :y 100)
                  (make-instance 'capi:push-button-panel
                    :x 30 :y 200
                    :items '(1 2 3))))))
  :best-width 500
  :best-height 500)

The children of the pinboard-layout are positioned, as expected, within their
parent. Replace the pinboard-layout with a static-layout, however, and the
children now appear to be positioned relative to the enclosing column-layout (or
maybe the top-level container). This just doesn't seem right. Thoughts, suggestions?

LW 6.0.1 Personal, WinXP

Best,
Chris
Updated at: 2020-12-10 08:38 UTC