Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TextBox, Search Buttom and Valid event takes control
Message
De
02/04/2001 05:15:05
 
 
À
02/04/2001 00:41:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00490676
Message ID:
00490860
Vues:
9
Hi João

>I have a form with one TextBox, one Buttom CmdSearch, when i go to click in CmdSearch the TextBox Valid event takes control, and i can´t go anywhere,
> Any trick here?

Try puting on the method Gotfocus a variavel to control the value, and then on the valid check if is diferent from the original value ...

Method GotFocus ....
OldValue = This.Value

Method Valid ...
if This.Value = OldValue
Return
Endif
... rest of the code to validate


> Is there any way to send the focus automaticly to the TextBox that i leave?
(i have several textbox, it could be TextBox1, TextBox2....)

Use again the method GotFocus. On the Method GotFocus, save the name of the control, and then when you restore to the last control only have to can him back.

Method GotFocus ....
ControlFocus = This.Name

Methid Click in Search_Button
Do .... <>
ldummy = ControlFocus +".SetFocus"
&ldummy

NOTE: the best way is creating a textbox class and a form class for both examples.

HTH
Nuno Brito
Nuno Brito
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform