Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capturing listbox selections
Message
From
29/10/1997 08:00:06
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00057049
Message ID:
00057173
Views:
34
I appreciate that, Jim.

Thanks.
Jim N

>Jim,
>
>I think you're right perhaps we could use an event that fired on selction/deselection of an item regardless of how the selection was accomplished. I'll submit that as an ER to MS.
>
>JimB
>
>>Jim,
>>
>>Bill's problem does, though, seem to open up a larger issue, at least in my eyes. . .
>>
>>Since Windows is designed for either mouse or keyboard (at least theoretically), should we not have some events available for keying in/at certain items as well as clicking? - at least for those instances where something *can* change "state" as a result of the keystroke (as it would with a click?
>>
>>So, in Bill's case, we seem to be missing the equivalent of a MouseUp for keystrokes. Bill *can* get control when the mouse is used, so should he not also be able to get control when the keyboard is used?
>>
>>Perhaps what is needed is another event applicable to BOTH, like a "StateChange" event, so that one common code set could be used instead of having to have two sets.
>>
>>There are no doubt other instances where there is currently a "missing" keyboarding function.
>>
>>Keyboards are here for a while yet - try to convince a data-entry "pro" to use the mouse. Acknowledging that, I suggest we need such functionality.
>>
>>What say you?
>>
>>Jim N
>>
>>>Bill,
>>>
>>>here's an idea for your keypress code, tyr this and see if it helps;
>>>
>>> * Listbox Keypress
>>> DoDefault()
>>> * Now do you processing of the entries
>>>
>>> NODEFAULT && after you process your entries to keep the default keypress behavior from firing twice
>>>
>>>
>>>
>>>
>>>>>>I have a multi-select listbox on a form. As items are selected, I have to update a textbox on the form with amounts from the selected items. No problem with single items selected or multiple items selected with the mouse ( I use the mouseup event to process so the item is already marked as selected ).
>>>>>>
>>>>>>However, when the keyboard is used to select items, I use the keypress event to process in. But the item(s) is not marked as selected until after the event. I got around this with single items by processing the opposite of whether the item is currently selected. This won't work when multiple items are selected ( Shift + Space ) because the "in-between" items are not yet selected and I have no way of telling all the items that will wind up being selected after the event is completed. Is there another event I can use to do my processing in which the listbox "sees" the items as already selected?
>>>>>>
>>>>>>Thanks,
>>>>>>Bill
>>>>>
>>>>>Did you try count selected in InteractiveChange?
>>>>
>>>>Hi Edward,
>>>>
>>>>I looked at Interactivechange, but it fires whenever the pointer is moved, not just when items are selected. Valid only fires when Enter is pressed, not when items selected using Space bar. Will have to give it some more thought.
>>>>
>>>>Thanks,
>>>>Bill
Previous
Reply
Map
View

Click here to load this message in the networking platform