Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List box view
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00488756
Message ID:
00518166
Views:
12
>I just came across an very strange thing, with list boxes,
>here is what goes on. in a form (class form)
>
>on the form I have a search button, which gets the data necessary into a local cursor
>Then the list box is filled type 6 with data from that cursor,
>
>when I fill in a text box again search stuff.. and press the button again, which closes the cursor, and refills in the listbox data....
>
>the list box on the screen does not refresh until I put the mouse over it, to activiate it.
>
>I have tried refreshing the list box, also requery() the list box, - after the new data is in it.. I have even gone so far as making the list box non visible, and then visible when it had new data...
>nothing seems to work.
>
>when I step through it with set step on. everthing works fine... just running it when I am not stepping through it, I find this - lack of refresh...
>
>is there something I am missing ? is there a workarround ?
>
>Thanks for reading.
>Bob Lee



For what it's worth...

I've gotten in the habit of setting the listbox.RowSource = "" doing the requery then setting the RowSource back to the desired alias, cursor, field, etc. I found out, just like with grids, that it sometimes takes the headache away (or prevents it all together).

Since Mario found out that SetFocus works as well, that's definitely a good alternative if you don't mind the focus going back to the listbox.


- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform