Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Howto Shift Focus Out Of A Grid
Message
De
12/11/2004 15:50:16
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
12/11/2004 15:40:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00961010
Message ID:
00961015
Vues:
9
>Hello everyone,
>
>I would like to know the best way to programatically move focus "away" from a grid that currently has focus. In the form in question, just after it opens for the first time, I call a method on the grid that scrolls to the correct position in the grid and sets focus to the appropriate column depending on the current order of the grid's recordsource (if there is a column in the grid that is based on the current order).
>
>The problem is that after "sorting" the grid out for the first time, I actually want to focus on a particular control on the form. However, even after calling the control's Setfocus method, focus still stays with the grid (FYI, the grid is in a container that is in page #1 of a pageframe).
>
>So, if anyone knows how to shift focus away from the grid to a nominated control, I would really appreciate any tips.

If you're doing this .setfocus() within a .losfocus() of an object, you have to include a NoDefault there, otherwise the object which is losing focus will do it's default, which is to hand the focus to the next object in tab order. Your object did get the focus meanwhile, but lost it then because of this default behavior.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform