2014-03-12 16:58 UTC
Hi all,
The OnSelChanged event for listbox is not adequate for my needs and I was wondering if there is a way around it of if a new event is possible?
For a listbox control the OnSelChanged event fires each time the mouse selects an item. If you set the list style to "multiple" it still fires each time the mouse selects an item...not just once after the selection process is completed by letting go of "shift" or "ctrl". Would it be possible to add some kind of "OnSelectionCompleted" event?
As a workaround I was thinking maybe during the OnSelChanged event I could try to detect of the CTRL or SHIFT key is held down...but I think that would always be detected as true and never false so there would still never be a way to know if the selection was completed. Maybe there is some other workaround that I haven't thought of...
The reason I want this is because I have to give the user some feedback after some selections are made but I don't want to interrupt the selection process with a (possibly false!) warning message until the selections are final.
My solution now is to provide the feedback when the user presses OK and the message has to explain the problem and where to go to fix it. It would be much better if the feedback were more immediate and self-explanatory.
Thanks,
James LeVieux
The OnSelChanged event for listbox is not adequate for my needs and I was wondering if there is a way around it of if a new event is possible?
For a listbox control the OnSelChanged event fires each time the mouse selects an item. If you set the list style to "multiple" it still fires each time the mouse selects an item...not just once after the selection process is completed by letting go of "shift" or "ctrl". Would it be possible to add some kind of "OnSelectionCompleted" event?
As a workaround I was thinking maybe during the OnSelChanged event I could try to detect of the CTRL or SHIFT key is held down...but I think that would always be detected as true and never false so there would still never be a way to know if the selection was completed. Maybe there is some other workaround that I haven't thought of...
The reason I want this is because I have to give the user some feedback after some selections are made but I don't want to interrupt the selection process with a (possibly false!) warning message until the selections are final.
My solution now is to provide the feedback when the user presses OK and the message has to explain the problem and where to go to fix it. It would be much better if the feedback were more immediate and self-explanatory.
Thanks,
James LeVieux