>How do I do to check for focus? Is there any other method then ActiveControl?
>
>/Mårten Törnquist
>
>>The same thing heppens to me. This is, I believe, a known VFP bug. The workaround is to move focus away from the grid before the form refresh. Usually I put code in form refresh() to (1) set .lockscreen = .T., (2) check for focus. (3) if focus is in the grid, move the focus (4) dodefault() to refresh the form, (4) If focus was in the grid, set focus back to the grid, (5) unlock the screen.
>>
>>This seems to do the trick.
>>
>>regards,
You can use activecontrol. But I don't think grids show up in active control, just the textboxes etc in the grid. So you will have to check the grandparent of the activecontrol to see if it is a grid. Its been a while since I looked at this code, so I may be wrong about activecontrol not showing grids.
regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.comNo trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.