Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox - Looks like a bug
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00204448
Message ID:
00204455
Views:
20
Ups! In the example that I mentioned there is ONE deleted record and that is the reason of the difference between reccount() and listcount property. However, the listbox control is detecting the deleted record UNTIL I scroll down the listbox - not when I assign the RowSource property.

How can I force the listbox to update the listcount property just-in-time?

>In some cases my listbox Listcount property is different from
>MyTable reccount(), even if there are no deleted records in
>the table. My listbox rowsourcetype=2 (alias) and rowsource=mytable.
>
>Here is what I found:
> Create a form.
> Add a listbox control.
> Add the table OrdItems (VFP\Samples\Tastrade\data\orditems.dbf) to the form.
>
> Add a watch point in the debug to Thisform.List1.ListCount
> Add a watch point in the debug to reccount()
>
> Run the form, both values in the debuger have the same value: 2821.
> Click on the listbox scroll bar and go to the bottom:
> SURPRISE! now Thisform.List1.ListCount is equal to 2820
> and -of course- reccount() still 2821
>
>Any ideas?
>Is this a known bug?
>Am I doing something wrong?
Hector Correa
Previous
Reply
Map
View

Click here to load this message in the networking platform