All Manuals > CAPI User Guide > 7 Laying Out CAPI Panes > 7.5 Advanced pane layouts

NextPrevUpTopContentsIndex

7.5.3 Dividers and separators

If you need adjacent panes in a row or column to have a narrow user-movable divider between them, supply the special value :divider in the description . The divider allows the user to resize one pane into the space of the other. To see this in the column layout below, grab the divider between the two panes and then drag it vertically to resize both panes:

(contain (make-instance 'column-layout
                        :description (list green-pane
                                           :divider red-pane)))

The arrow keys can also be used to move the divider.

To include a narrow non-movable visible element between adjacent panes, supply the special value :separator in the description.

If you also specify ratios, the ratio for each occurrence of either of these special values should be nil to specify that the narrow element is fixed at its minimum size:

(contain (make-instance 'column-layout
           :description (list
                        (make-instance 'output-pane 
                                       :background :red)
                        :divider
                        (make-instance 'output-pane 
                                       :background :white)
                        :separator
                        (make-instance 'output-pane 
                                       :background :blue))
           :y-ratios '(1 nil 4 nil 1)
           :title "You can drag the divider, but not the separator"
           :background :grey))

Dividers and separators can also be placed between panes in a row-layout or even combinations of row and column layouts.


CAPI User Guide (Unix version) - 30 Aug 2011

NextPrevUpTopContentsIndex