Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting focus to a row,coll in a grid
Message
From
10/10/2000 14:31:55
 
 
To
10/10/2000 14:28:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00427423
Message ID:
00427465
Views:
15
>>>I am having trouble forcing setfocus onto the first cell in my grid programatically. I tried the ActiveateCell method of the grid, and the ...Text1.Setfocus() method but the only way I can get the cell to be selected is manually with the mouse :(
>>>
>>>Thanks in advance
>>
>>Try setting focus to the grid object, then doing you're ActivateCell.
>
>Thanks Fred. I had to.
>
>ThisForm.Pageframecustom1.ActivePage = 1
>ThisForm.Pageframecustom1.Page1.SetFocus()
>ThisForm.Pageframecustom1.Page1.Gridcustom1.Column1.Text1.SetFocus()
>
>in the form.init and then it worked. Set focus to the page was the key.
>
>Sorry to waste your time.
>
>Terry

I wouldn't recommend putting ANY SetFocus in the form Init. It causes a world of difficult to trace problems on some computers (timing?). Try moving it to the form Activate or GotFocus methods instead.

Load
Init
Show
Activate
GotFocus

LISAG
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform