Discussion:
How to collect user input in combo box ...
(too old to reply)
budgie
2006-03-30 12:22:02 UTC
Permalink
Yep, me again with more problems :( but at least this should be easy for you
gurus.

I have a combo box with numbers (say) 1-99 available in a drop-down for the
users to choose from. However I am having a problem finding a means to
handle/collect user input when the user types a number into the box rather than
drop'n'scroll. This is a data entry aka selection that I want to support.

Short of watching every keypress event and waiting for a <CR>, how can I get the
user's (usually two-digit) entry?

Thanks for any constructive suggestions.
Jonathan Rothwell
2006-04-02 16:57:38 UTC
Permalink
Dear Budgie,
Post by budgie
I have a combo box with numbers (say) 1-99 available in a drop-down for the
users to choose from. However I am having a problem finding a means to
handle/collect user input when the user types a number into the box rather than
drop'n'scroll. This is a data entry aka selection that I want to support.
Try using the event YourComboBoxName_CHANGE. This works in text boxes, but
I've not yet tried it with a combo box.
Hope this helps.
budgie
2006-04-03 00:54:33 UTC
Permalink
On Sun, 02 Apr 2006 16:57:38 GMT, "Jonathan Rothwell"
Post by Jonathan Rothwell
Dear Budgie,
Post by budgie
I have a combo box with numbers (say) 1-99 available in a drop-down for the
users to choose from. However I am having a problem finding a means to
handle/collect user input when the user types a number into the box rather than
drop'n'scroll. This is a data entry aka selection that I want to support.
Try using the event YourComboBoxName_CHANGE. This works in text boxes, but
I've not yet tried it with a combo box.
Hope this helps.
That was one thing I tried, but it responds to *each* keystroke so I would have
to "build" the result. Also it doesn't avoid the <return> generating a beep and
nothing else. I couldn't see a way to achieve an end-of-user-input when the
<return> key is pressed.

I wound up (after much trial-and-error ) using _KeyUp event to SETFOCUS to the
next tabbed control when the character code was 13 (return). Not elegant, but
it worked.

Continue reading on narkive:
Loading...