Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus on Grid field not working after Form Activate
Message
From
13/11/1998 13:25:24
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
 
 
To
13/11/1998 05:27:50
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00157317
Message ID:
00157481
Views:
17
Hi Martyn. I don't know what code you are using but juast as a WAG, in a grid you have to set focus to a column not a control (I do belive). Here is what works for me.

thisform.grdName.SetFocus()
thisform.grdName.column2.SetFocus()

HTH

>I have a grid with a search button in it. In the click event of the button I call another form and, depending on the value returned by the form, SetFocus to another field on the same row in the grid. The SetFocus does not seem to work as the focus always seems to be the first field on the row. I have done some investigation and it seems that SetFocus to a field outside the grid works. Also if I keyboard the correct number of tabs then this seems to work. What I want to know is why SetFocus does not seem to work. Am I missing something? Is something else moving the focus after?
***************************
Bruce Gilmour

"Two things are infinite, the Universe and human stupidity. And I am not sure about the Universe."
- Albert Einstein
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform