General information
Category:
Forms & Form designer
Michael,
You may consider adding a bogus control in the grid's Refresh() method, set the focus to that control, remove that control, then return the focus back to the grid.
Example of Refresh() code in grid:
IF TYPE('THIS.Parent.txtBogus') # 'O'
THIS.Parent.AddObject('txtBogus', 'textbox')
THIS.Parent.txtBogus.SetFocus()
THIS.Parent.RemoveObject('txtBogus')
ENDIF
THIS.Refresh()
THIS.SetFocus()
Doug
>We have found a small bug in Visual FoxPro when the cursor sits on a column of a grid and when we do a refresh. Occasionnaly, the grid won't be refreshed. When that happens, and that only happens occasionnaly, we just put the cursor on another control, outside of the grid, and the next refresh will be ok.
>
>We would like to update the framework to put the cursor out of a grid control, if we are on one of them, when we navigate or save for example. What would be the best approach for that? There is no SetFocus() at the form level. So, we need to rely on something else that will always work no matter what type of form we have.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only