Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to set focus from a Grid Textbox?
Message
 
 
À
16/08/2013 09:52:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01580622
Message ID:
01580665
Vues:
89
>HI friends:
>
>I have this problem.
>
>I've got a grid with a determined number of rows.
>
>When I'm on the last record empty field is allowed and valid returns "RETURN THISFORM.MYBUTTOM" because I want a confirm button has the focus after input a data or not (enter)
>
>The point is focus remains on textbox and valid is performed because I put code saying "I'm the valid method" and saying "Valid is done" but mybutton When event won't execute.
>
>What am i doing wrong or what is what I ignore about this?
>
>Thank you.
>
> Héctor

You can set the focus to the textbox using a timer. Put a timer on the form, Interval = 200, Enabled = .F.
In the Timer() event of the timer write:
THIS.Enabled = .F.
THISFORM.MyButton.SetFocus()
In the valid of the textbox, instead setting the focus to the button, just enable the timer:
THISFORM.tmrFocus.Enabled = .T.
HTH
Christian Isberner
Software Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform