I've come across certain issues concerning the listbox widget.
First of all, evidently there's no `activate' method.
Suppose I create a listbox with three items and select the second (i. e. the middle) one at the initialization:
Code: Select all
(with-ltk ()
(let ((l (make-instance 'listbox)))
(listbox-append l '("foo" "bar" "baz"))
(listbox-select l 1)
(pack l)
(focus l)))
Code: Select all
(defgeneric listbox-activate (l index))
(defmethod listbox-activate ((l listbox) index)
(format-wish "~a activate ~a" (widget-path l) index)
l)
On a related note: the listbox widget has the listvariable option. However, I failed to produce a working example. Any suggestions? (BTW, I greatly appreciate LTK's design in the way that it keeps all the StringVar mess under the hood, unlike Python. It would be nice to have the VALUE method for listboxes as well. Yet I don't know how to retrieve listbox items if not implementing listbox-get, which is also missing and perhaps obsolete.)
I've found the LTK mailing list, but something must be wrong with mailing lists on common-lisp.net, the links are broken for the most part.