5 Laying Out CAPI Panes
The following four hints are recognized by all layouts:
:visible-min-width-- the minimum width of the child
:visible-max-width-- the maximum width of the child
:visible-min-height-- the minimum height of the child
:visible-max-height-- the maximum height of the child
In the last section, you created a window with five panes, by combining row and column layouts. Now consider changing the definition of the editor pane so that it required to have a minimum size. This would be a sensible change to make, because editor panes need to be large enough to work with comfortably.
(setq editor2 (make-instance 'editor-pane :visible-min-width '(:character 30) :visible-min-height '(:character 10)))You will now have to place this new editor into the layouts that contained the old one. Only one layout is affected: the overall column layout which brings all the panes together.
Before typing the following into the listener, you should close down all the windows created in this chapter, by using Works > Exit > Window on each in turn, in order to free up the instances of
Button2 and so forth.
(contain (make-instance 'column-layout :description (list row1 row2 editor2)))Figure 5.5 The result of resizing the sample layout
Generated with Harlequin WebMaker