All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

column-layout Class


A layout which arranges its children in a column.





The size ratios between the layout's children.
The horizontal adjustment for each child.
The gap between each child.
If t, each child in the column has the same height.



The class column-layout lays its children out in a column. It inherits the behavior from grid-layout. The description is a list of the layout's children, and the layout also translates the initargs ratios, adjust, gap and uniform-size-p into the equivalent grid-layout initargs y-ratios, x-adjust, y-gap and y-uniform-size-p.

description may also contain the keywords :divider and :separator which create a divider or separator as a child of the column-layout. The user can move a divider, but cannot move a separator.

When specifying :ratios in a row with :divider or :separator, you should use nil to specify that the divider or separator is given its minimum size, as in the example below.

(capi:contain (make-instance
                 (make-instance 'capi:push-button
                                :text "Press me")
                (make-instance 'capi:list-panel
                               :items '(1 2 3)))))
(setq column (capi:contain
                (make-instance 'capi:push-button
                               :text "Press me")
                (make-instance 'capi:list-panel
                               :items '(1 2 3)))
               :adjust :center)))
 column #'(setf capi:layout-x-adjust) :right column)
 column #'(setf capi:layout-x-adjust) :left column)
 column #'(setf capi:layout-x-adjust) :center column)
(flet ((make-list-panel (x y)
          (loop for i below x
                collect i)
          (loop for i below x by y
                collect i)
     (make-list-panel 100 5)
     (make-list-panel 100 10))
    :ratios '(1 nil 2))))
See also

1.2.1 CAPI elements
5.2 Button panel classes
6 Laying Out CAPI Panes
7 Programming with CAPI Windows
11 Defining Interface Classes - top level windows

CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27