Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editbox in grid refresh problem - vfp 8.0
Message
From
28/01/2004 17:00:45
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00870675
Message ID:
00871585
Views:
10
Hi again Nancy

Sorry, I have not a turnkey solution to your problem, but something like your code should do the trick.

Is 15 really the correct value for activecolumn?

Or you could add a logical property lStopRefresh to the grid, replace this.activecolumn with this.lStopRefresh, and then set/reset this property in the gotfocus/lostfocus of your editbox. Should also do the trick.

Good luck!
>Tore,
>
>no activex control or baseclasses involved. the grid was created in VFP 7 and now runs in VFP 8.
>
>"Ugly solutions are us" (as long as they work) :). Please let me know how I can disable the grid's refresh when i enter the editbox. I did try to do this myself by putting in something like this in the REFRESH event of the grid.
>
>if this.activecolumn = 15
> nodefault
>endif
>
>also it is definitely the refresh event of the grid that is firing at two mins. i determined this by putting in "wait windows" of every refresh event - grid, column, text box, etc.
>
>Thanks,
>
>N.
>
>>Hi Nancy
>>
>>Since grids don't refresh automatically, there must be something 'strange' going on. Are yout grid and all its elements based on baseclasses? Do you have any ActiveX control active?
>>
>>You could disable the grid's refresh while you were editing in the editbox, and enable it again afterwards, but it is an ugly solution. It's a little like giving the patient pills to ease the pain in stead of curing the cause of the pain. You always risk side effects.
>>
>>>hi terry,
>>>
>>>actually i don't have a timer and i am not knowingly refreshing the grid. it seems to refresh by itself. "set refresh to 3600" does not seem to have any effect on this.
>>>
>>>thnx,
>>>
>>>nancy
>>>
>>>>>i have a grid containing several columns including one that has an editbox. everything works beautifully except around two minutes when the grid refreshes, the cursor automatically goes to the front of the edit box. this is a real pain especially if you are typing in the field when the refresh occurs.
>>>>>
>>>>>i cannot figure out how to prevent this from happening. else, is there a way to temporarily prevent the grid from refreshing at the two minute mark?
>>>>>
>>>>>thanks,
>>>>>
>>>>>nancy
>>>>
>>>>Just to follow up Tore - a best practice may be not to refresh the grid unless underlying data has been changed.
Previous
Reply
Map
View

Click here to load this message in the networking platform