>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