MPIon
Well-known member
Surely this has to be a bug.
I have a list box which I have set to MultiExtended selection mode, as I want the normal user procedure to be only to select one item, but allow multiple selection if the user holds the Control Key and clicks.
This works, but there is a problem when using the shift key. With the shift key, you can select multiple items in a block, and all are highlighted, but only one is actually selected (the one previously selected).
With MultiSimple, the shift key works correctly and all highlighted items are selected.
I have tried to find a work around for this by switching to MultiSimple and testing for Keys.ControlKey, which if false, would clear the previous selected item. Trouble with this, is the just clicked item is not selected.
I can't find a way to identify the item just clicked in the ListBox, rather than the previously selected item - which is always the first selected item in the list. Hope this is clear.
Can anyone confirm if this is a known bug and a good way to work round it? I've looked and can't find much on this at all.
I have a list box which I have set to MultiExtended selection mode, as I want the normal user procedure to be only to select one item, but allow multiple selection if the user holds the Control Key and clicks.
This works, but there is a problem when using the shift key. With the shift key, you can select multiple items in a block, and all are highlighted, but only one is actually selected (the one previously selected).
With MultiSimple, the shift key works correctly and all highlighted items are selected.
I have tried to find a work around for this by switching to MultiSimple and testing for Keys.ControlKey, which if false, would clear the previous selected item. Trouble with this, is the just clicked item is not selected.
I can't find a way to identify the item just clicked in the ListBox, rather than the previously selected item - which is always the first selected item in the list. Hope this is clear.
Can anyone confirm if this is a known bug and a good way to work round it? I've looked and can't find much on this at all.