text-input-choice :read-only and :completion-function
I would like to have a drop-down list for picking a state. I have tried
implementing this using text-input-choice, but neither setting :enabled
to :read-only nor specifying a completion-function works the way I expected.
I am able to type text into the pane even though it is read-only and my
completion-function is never called when I tab out of the pane.
Thanks for any advice.
Mitch
(defconstant +state-abbreviations+
(list "AL" "AK" "AR" "AZ" "CA"
"CO" "CT" "DE" "DC" "FL"))
(defun completion-fn (pane text)
(print "completion-fn called"))
(capi:contain
(make-instance 'capi:column-layout
:description
(list (make-instance
'capi:text-input-choice
:items +state-abbreviations+
:selection 0
:max-characters 2
:enabled :read-only
:completion-function 'completion-fn)
(make-instance
'capi:text-input-pane))))