Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid Event does not fire when I click outside of the ob
Message
From
20/07/1998 15:54:25
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00119392
Message ID:
00119448
Views:
30
>>Why in the first time I can exit the object with the mouse and in the
>>second I can't ?
>>
>>TIA.
>
>Antonio,
>
>It all depends on where you click. Objects like menus and toolbars never getfocus, so teh contrl that had focus doesn't lose it. The Valid fires in the process of the control losing focus. You alos won't fire the valid if you click on the start bar and select a different applciation.
>
>For toolbars and enis in VFP you can address the issue by inlcuding the following lines of code in every method that may fire as a result of hitting a menu or toolbar button.
>
>
>IF TYPE(_SCREEN.ActiveForm.ActiveControl.Name) = "C"
>   IF PEMSTATUS(_SCREEN,ActiveForm.ActiveControl, "SetFocus",5)
>      _SCREEN.ActiveForm.ActiveControl.SEtFocus()
>   ENDIF
>ENDIF
>* The rest of the code here
>
>
>The code checks to be sure there is an activecontrol and then it checkls to be sure that control has a SetFocus method. It then calls teh setfocus fo teh current control. By setting focus to itself a control will fier its valid, LostFocus, When, and finally the GotFocus.

In my case, the object is textbox over pageframe. The toolbar is in the same
page of the textbox.
Antonio Carlos Kleinübing
Systems Analyst
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform