Q: How to scroll capi:list-panel just after displaying in LWW 4.4
Hello lispworkers, I want to select an item from a list panel just after creating it. But I am not able to make the panel scroll to the ensure the item to be visible. (capi:define-interface test () () (:panes (pane capi:list-panel :items (loop for i upfrom 0 below 100 collect (format nil "~d" i)) :test-function 'string= ;:keep-selection-p t ;:initial-focus-item "66" :visible-min-height '(:character 20)))) (defmethod capi:interface-display :after ((face test)) (with-slots (pane) face (setf (capi:choice-selection pane) (capi:search-for-item pane "66")))) (setq face (capi:display (make-instance 'test)) pane (slot-value face 'pane)) The item "66" really gets selected. Unfortunately, the initial scroll position is on the top of the list, and the selected item is not visible. Afterwards, evaluating (setf (capi:choice-selection pane) (capi:search-for-item pane "66") in the Editor works fine. Placing (setf capi:choice-selection) in the :creation-callback does not help. Any takers? BTW, the :initial-focus-item initarg does not work it at all, must it? -- Sincerely, Dmitri Ivanov www.ystok.ru