Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Bug or what?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Listbox Bug or what?
Miscellaneous
Thread ID:
00114329
Message ID:
00114329
Views:
58
I'm having a reproducible problem with a listbox with rowsourcetype of FIELDS.
Rowsource is 4 fields in a table.
Multiselect is .T.
The table has about 1000 rows.
I can multiselect and manipulate the selected items as desired. The problem is that the listbox does not refresh itself correctly. For example, I scroll to maybe the 100th item in the list, select it and a couple of neighbors, and click a button whose click event changes these rows. No problem. However, when I do a refresh on the listbox, the rows that were previously selected no longer are, and some random rows elsewhere are now selected. To fix this problem, I created a temporary array to store the valued of .SELECTED(x) for the listbox, then I set multiselect to .F., then back to .T., then set SELECTED(x) back to .T. for those items that had been selected (yeah, what a kludge!). Now the Listbox *looks* OK, but it still isn't. Whenever I scroll back to the top of the list, it doesn't show the correct rows. For example, the top rows that are displayed now actually begin with row 80 in the table. But if I click on the top row that is displayed, it instantly changes its content to reflect the first row on the table (this is definitely a bug!). But the second displayed row remains incorrect until I click on it, then it magically changes its contents to show the correct row from the table (i.e., record number 2). I have Visual Studio Service pack 3 installed. What gives?
Next
Reply
Map
View

Click here to load this message in the networking platform