Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event sequence: When of new object fires before LostFocu
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00143145
Message ID:
00143148
Views:
25
>Hi,
>
>We have the following happening to us:
>
>We have to textbox objects, Text1 and Text2. If the user tabs from Text1 to Text2 the events fires as follow:
>
>Text1.LostFocus
>Text1.Valid
>Text2.When
>Text2.GotFocus
>
>but if the user selects Text2 with the mouse the firing sequence changes to:
>
>Text1.LostFocus
>Text2.When
>Text1.Valid
>Text2.GotFocus
>
>
>Is there some way to make VFP(3) behave the same way when clicking as when using tab ??

The safest bet would be not to spread the code so many places, but a custom property in the form might do the trick
In text2.When
IF !Thisform.text1ValidOK
  IF !text1.valid()
    text1.SetFocus() && or return .f.
  ENDIF
ENDIF
Danijel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform