Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TextBox, Search Buttom and Valid event takes control
Message
From
02/04/2001 05:15:05
 
 
To
02/04/2001 00:41:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00490676
Message ID:
00490860
Views:
10
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
Previous
Reply
Map
View

Click here to load this message in the networking platform