Fixed size switchable layout
I have a switchable layout in the middle of the a dialog. I would
like the layout size to be determined by the largest child, not by
the child that's currently selected. Is this possible?
To be more specific, my dialog is similar to the one below. When you
click the Switch button, the Do Nothing button jumps up and down. I
would like the Do Nothing button to stay in place, and for extra
space to appear above it when using the smaller child. How can I get
that to happen?
(capi:contain
(let* ((this (make-instance 'capi:column-layout
:description (list
(make-instance 'capi:text-input-pane
:title "#1")
(make-instance 'capi:text-input-pane
:title "#2")
(make-instance 'capi:text-input-pane
:title "#3"))))
(other (make-instance 'capi:column-layout
:description (list
(make-instance 'capi:text-input-pane
:title "Something else"))))
(switch (make-instance 'capi:switchable-layout
:description (list this other))))
(make-instance 'capi:column-layout
:description (list (make-instance 'capi:push-button
:text "Switch"
:selection-callback
#'(lambda (item interface)
item
(rotatef this other)
(setf
(capi:switchable-layout-visible-child switch) this)))
switch
(make-instance 'capi:output-pane
:visible-min-height 1 :visible-max-height t)
(make-instance 'capi:push-button
:text "Do Nothing")))))