Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid Event does not fire when I click outside of the ob
Message
De
20/07/1998 15:54:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00119392
Message ID:
00119448
Vues:
32
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform