[cells-devel] multiselect listbox

Andy Chambers achambers.home at googlemail.com
Fri Oct 26 22:42:12 UTC 2007


Hi,

I tried to hack at the scrolled-list definition to make it support
multi-select lists but it didn't seem to work.  Is there something
else you have to change to get this working?

(deftk scrolled-list (row-mixin frame-selector)
  ((list-item-keys :initarg :list-item-keys :accessor list-item-keys
:initform nil)
   (list-item-factory :initarg :list-item-factory :accessor
list-item-factory :initform nil)
   (list-height :initarg :list-height :accessor list-height :initform nil)
   (selectmode :initarg :selectmode :accessor selectmode :initform nil))
  (:default-initargs
      :list-height (c? (max 1 (length (^list-item-keys))))
    :kids-packing nil
      :kids (c? (the-kids
                 (mk-listbox :id :list-me
                   :kids (c? (the-kids
                              (mapcar (list-item-factory .parent)
                                (list-item-keys .parent))))
	-->	  :selectmode (c? (selectmode .parent))       <--
                   :tkfont '(courier 9)
                   :state (c? (if (enabled .parent) 'normal 'disabled))
                   :takefocus (c? (if (enabled .parent) 1 0))
                   :height (c? (list-height .parent))
                   :packing (c? (format nil "pack ~a -side left -fill
both -expand 1" (^path)))
                   :yscrollcommand (c? (when (enabled .parent)
                                         (format nil "~a set" (path (nsib))))))
                 (mk-scrollbar :id :vscroll
                     :packing (c?pack-self "-side right -fill y")
                     :command (c? (format nil "~a yview" (path (psib)))))))))


Cheers,
Andy



More information about the cells-devel mailing list