>I have a ListBox control with RowSourceType = 5(Array) and MultiSelect = .T.
>
>If I select an item(s) and then deselect an item, the deslected item becomes automatically selected again when the control loses focus.
>
>I put the following workaround in the MouseUp Event which takes care of the problem:
>
>IF NOT This.Selected(This.ListIndex)
> This.DisplayValue = ""
>ENDIF
>
>The following also works, but affects a different behavior with respect to the remaining selected items:
>
>This.Selected(This.ListIndex) = This.Selected(This.ListIndex)
>
>
>Has anyone else experienced this problem?
Not quite those, but have found I'm having difficulty selecting an item in a listbox has it's source as an array. The list is on a modal dialog and a key value is already known. The array is loaded and set as the rowsource to the listbox and then a method is called which is supposed to "select" the item in the list matching the key. Although the debugger shows the item being selected, it doesn't turn the blue I'm expecting so to the user, it appears that nothing is selected. It is possible that your item (b) line might work but haven't tried that yet.
Steve
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only