Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form refresh not keeping up with table changes
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00343411
Message ID:
00344390
Views:
21
Colin,
Yes Draw only updates the _screen or a form. (oIndex.Draw() ) There is almost nothing about it in the VFP help file but the Hacker's Guide explains that Draw only redraws screen objects whereas refresh updates the data in all the objects. Since I am updating the edit box values with the prg it works. The difference is amazing.

>Glad you got it. What led you to this? I had a look at VFP help and Draw isn't even listed as a method or event for the editbox or textbox. In fact, when I looked up the Draw Method it stated that it only applied to Form and _SCREEN.
>
>On that note, if you recompile this app when VFP7 comes out, revisit this to make sure it still works. You might want to put some comments in your code to remind you that this is an undocumented fix.
>
>Cheers,
>
>>It's Fixed!
>>
>>Here are the steps:
>>Form is running modless with index.prg updating it.
>>After prg updates an edit box it does oIndex.Draw(). Yes Draw, not Refresh().
>>I do no refresh on the grid. The grid shows the change in column 1 from Working to Done after the replace but does not scroll. After running through 20 records the prg runs:
>>oIndex.LockScreen = .t.
>>oIndex.Grid.DoScroll(1)
>>oIndex.LockScreen = .f.
>>
>>This keeps the current record from scrolling off the screen. Without the lockscreen the current record was duplicated on the grid after the doscroll.
>>
>>It runs very smoothly. The Draw method in place of the refresh() seemed to make a real difference. Don't ask me why.
>>
>>Thanks to all that helped.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform