Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus Doesn't Work
Message
 
 
À
20/05/2009 10:34:52
Robert Dinsmore
Dinsmore & Associates, Inc.
Lexington, Kentucky, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01400953
Message ID:
01400956
Vues:
85
>A form designed for data entry contains a page frame and a grid on the first page listing the records in a file. The first column in the grid allows for incremental search based on the record key. Therefore, if the record pointer is on Number 1 and the user wishes to go to Number 3, they just press "3" and the record pointer jumps to that record. They can go to the details of that record (Page 1 on the form) by either pressing the Enter key or clicking on Page 1.
>
>Here is the problem: when the Enter key is pressed the form advances to Page 1 as it should. However, when they click on Save or Cancel and the form returns to the grid, Column 1 does not have the focus. At this point, if a key is pressed to search for another record, the cursor jumps out of the grid and to another object on the form.
>
>This only happens when the Enter key is used to advance to Page 1. If, instead, Page 1 is clicked and then Save or Cancel is clicked, the grid gets the focus as it should.
>
>This would indicate that there is something about the Enter key to cause this. Since the code works when the page is clicked, I would have to assume it is OK.
>
>After many hours I have not been able to solve this. Any ideas would be greatly appreciated.

Can you directly set focus to the Grid's first column in Page.Activate event?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform