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

This seems to work.


;; From CAPI Reference Manual - see option pane
(setq option-pane (capi:contain
                    (make-instance 'capi:option-pane
                                   :items '(1 2 3 4 5)
                                   :selected-item 3)))

;; From CAPI Reference Manual - see option pane and collection
(capi:apply-in-pane-process
  option-pane #'(setf capi:collection-items)
  '(a b c d e) option-pane)



If you're not used to going up the object hierarchy to find the right  
accessor, that's an essential strategy. Or were you having a different  
problem?

You're welcome!

Laughing Water

On Jun 28, 2008, at 5:49 PM, 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
>
>


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