Lisp HUG Maillist Archive

possible to add columns to capi:multi-column-list-panel?

Is it possible to change the number of columns displayed in a multi- 
column-list-panel? I can't find any way to change the column  
specification once the panel has been instantiated.

If this isn't possible, could one swap an existing panel in an  
interface for a new one ? I've tried declaring an accessor for the  
panel pane and setf'ing like this:

(define-interface solution-list-interface ()
   ()
   (:panes
    (solution-list-pane multi-column-list-panel
                        :accessor solution-list-pane))
   (:documentation
    "A widget displaying solution data in multi-column-list-panel."))

(setf (solution-list-pane interface)
   (make-instance 'multi-column-list-panel
     :columns '((:title "#"
                                    :width (character 2))
                                   (:title "Word"
                                    :width (character 15))
                                   (:title "Gloss"
                                    :width (character 15))
                                   (:title "POS"
                                    :width (character 15)))
                        :visible-min-height :text-height))

But it seems like it doesn't affect the panel.

Any suggestions?

Kind regards

André

Re: possible to add columns to capi:multi-column-list-panel?


On Jun 28, 2009, at 8:45 AM, André Lynum wrote:

> Is it possible to change the number of columns displayed in a multi- 
> column-list-panel? I can't find any way to change the column  
> specification once the panel has been instantiated.

No, not possible.

>
>
> If this isn't possible, could one swap an existing panel in an  
> interface for a new one ? I've tried declaring an accessor for the  
> panel pane and setf'ing like this:

Yes, this is possible.


> But it seems like it doesn't affect the panel.



If I recall correctly, the trick is that you must also reset the  
layout description to get it to update. Something like:

(setf (layout-description layout) (layout-description layout))

I think there was something posted about this while back. I tried to  
check but searching the Gmane has been giving an error all day.




John DeSoi, Ph.D.





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