Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Bug & Workaround
Message
 
To
18/02/1999 13:12:07
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00188929
Message ID:
00189072
Views:
18
>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
Map
View

Click here to load this message in the networking platform