Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assigning methods(events) at runtime in VFP5?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00204299
Message ID:
00204300
Vues:
18
>Is there a way under VFP5 to assign an event procedure for a control on a form at runtime? Here is briefly what I am trying to do:
>
>do case
> case cType = "This"
> .Etxt1.LostFocus = procA
> case cType = "That"
> *remove the method reference
> .Etxt1.LostFocus = null
>endcase

Could you keep it simpler:
do case
case cType = "This"
thisform.blocklostfocus=.F.
case cType = "That"
thisform.blocklostfocus=.T.
endcase
***Etxt1.LostFocus event
IF thisform.blocklostfocus=.T.
thisform.blocklostfocus=.F. && if you want it
Return
ENDIF
** other code here
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform