Lisp HUG Maillist Archive

Changing option-pane items

Can someone tell me, or point me to where an example is, of how to change  
the list of items in an option-pane once it exists?

I need the items to be a dynamic list that changes depending on if  
something else is done. I tried using apply-in-pane-process, which worked  
great for other panes but not items on option-panes.

Thanks,

William


Re: Changing option-pane items

William P. Proffitt wrote:
>
> Can someone tell me, or point me to where an example is, of how to 
> change the list of items in an option-pane once it exists?
>
> I need the items to be a dynamic list that changes depending on if 
> something else is done. I tried using apply-in-pane-process, which 
> worked great for other panes but not items on option-panes.
>
> Thanks,
>
> William

(setq option-pane (capi:contain
                   (make-instance 'capi:option-pane
                                  :items '(1 2 3 4 5))))

(capi:apply-in-pane-process
      option-pane #'(setf capi:collection-items)
       '("A" "B" "C" "D") option-pane)

This is mostly shown in the example for option-pane class in the CAPI 
reference manual.

Mitch


Updated at: 2020-12-10 08:42 UTC