Lisp HUG Maillist Archive

choice list with icons and type-ahead

Anyone have suggestions on a cross-platform way to implement a choice  
list (like a capi:list-panel) that

1. allows an icon for each item
2. allows type-ahead to select items
3. can accept or cancel using the return and escape keys without  
having visible buttons

A popup menu would have worked except on Windows you can only have  
the icon or the menu text, not both.
I've looked into building something with a tree view, but type-head  
does not work on the Mac.




John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: choice list with icons and type-ahead

Hello John,

| Anyone have suggestions on a cross-platform way to implement a choice
| list (like a capi:list-panel) that
|
| 1. allows an icon for each item
| 2. allows type-ahead to select items
| 3. can accept or cancel using the return and escape keys without
| having visible buttons
|
| A popup menu would have worked except on Windows you can only have
| the icon or the menu text, not both.
| I've looked into building something with a tree view, but type-head
| does not work on the Mac.

FWIW, on Windows, I would suggest capi:list-view (not cross-platform)
combined with the following "hidden" button-panel (the actual excerpt from
YGrid/ywidgets/editable-pinboard.lisp).

 (:panes
  (buttons capi:push-button-panel :items
   `(,(make-instance 'capi:push-button  :cancel-p t  :data nil
                     :selection-callback 'finish-editing
                     :callback-type :interface-data
                     :visible-min-height 0  :visible-max-height 0
                     :accepts-focus-p nil)
     ,(make-instance 'capi:push-button  :default-p t  :data t
                     :selection-callback 'finish-editing
                     :callback-type :interface-data
                     :visible-min-height 0  :visible-max-height 0
                     :accepts-focus-p nil))
   :visible-min-width 0
   :accepts-focus-p nil))
 ...)
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


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