Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Click method
Message
From
02/04/2008 12:11:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01307205
Message ID:
01307658
Views:
15
>>UPDATE.......I know what is happening. Maybe somebody can tell me why!
>>
>>It appears that, on seemingly random occasions which start after about five clicks in the list box, the value for the control does not change when you click on a different item. You see the clicked-on item in highlite and you also see a dotted line around the previously selected item. (This is much more likely to occur if you hold down the mouse button to produce one long click event.) To me this is very unexpected behavior - I expect clicking in the listbox to set the value of the listbox to that item.
>>
>>I'd appreciate any enlightenment as to possible causes.
>>
>>I can now treat the symptoms - even if I don't yet know how to cure the disease. In the click method I have added
>>FOR I = 1 TO this.ListCount
>>     &&  Could somebody explain difference (if any) for Selected[] and SelectedId[]????
>>     IF this.SelectedId[I]
>>          this.value = this.list[I]
>>          EXIT
>>     ENDIF
>>ENDFOR
>>
>>and this appears to have taken care of the problem.
>>
>>.......Rich
>>
>Hi Rich,
>
>My former colleague Mike Asherman employed various gimmicks to solve some listbox quirks in multi-select mode. I don't recall all details, but I remember the when event of the listbox was involved (thus I was able to solve someone's else problem).
>
>If you need to see his comments on the issues (though it was in ~ 2000) I may contact my former colleague and ask her to take a look...


Thanks for the offer, but I don't think (maybe just wishful not thinking) that it will be necesssary. If I run into some more problems down the line, I'll keep the resource in mind.

......Rich
Previous
Reply
Map
View

Click here to load this message in the networking platform