Good Day,
Procedure TForm1.MyProc;
begin
....
end;
TForm1..DBGrid2DblClick(Sender: TObject);
begin
MyProc = Nil; // i want to disable myproc procedure, how?
.......
MyProc:=MyProc; // i want to enable myproc procedure, how?
end;
Thank You
I think what you are looking for is this, declare a var to the type of the event.
procedure TfrmRTCaddie.LicenseEditRefresh(const AValid: boolean; AInvalidReason: string);
var
ne: TNotifyEvent; //variable of event type
begin
ne := edtLicKeyCode.OnChange; //set the variable to the current onchagne
edtLicKeyCode.OnChange := nil; //set on change to nil
//work goes here
edtLicKeyCode.OnChange := ne; //asign the event hander back to the control event
end;