Lisp HUG Maillist Archive

Dynamically change column-layout children

Hello,

is there a way to change the children of a capi:column-layout at runtime if I define it via capi:define-interface? Or soes someone have a hint for me what I could do?

regards,
Philipp

Re: Dynamically change column-layout children

Philipp Bach <philipp.wilfried.bach@gmail.com> wrote:

> is there a way to change the children of a capi:column-layout at runtime

Have you tried (SETF CAPI:LAYOUT-DESCRIPTION)?

Arthur

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Dynamically change column-layout children

I have an app that does this. As Arthur pointed out, layout-description is setf-able and works great. Some things I've learned using this in my own app to keep in mind (without knowing what you are using it for):

1. Hiding child panes won't "collapse" the layout. It still assumes they are all there. So if you need this behavior, you'll need to rebuild your layout with an all new list of child panes.

2. Be careful when rebuilding your layout. If you have a selected child pane or similar, you'll need to somehow either not get rid of panes that should still be there or reselect (and scroll to) the selected one.

3. I highly recommend rebuilding the child list of panes as infrequently as possible and instead just add-to or remove-from the list. Otherwise (on Windows at least) you can end up with a lot of flickering.

Note to the LW team: while there might be reasons to not have hidden child panes in a layout collapse the layout, this would be *extremely* handy functionality for a future version. ;-)

Jeff M.

Philipp Bach
Wednesday, September 04, 2013 12:19 PM
Hello,

is there a way to change the children of a capi:column-layout at runtime if I define it via capi:define-interface? Or soes someone have a hint for me what I could do?

regards,
Philipp
Updated at: 2020-12-10 08:35 UTC