As you press the btnlnvoke button, you'll see its caption along with the name of the component that assigned the anonymous method handler:


l s r

btnlnvoke assigned by btnKeepRef

1 - 1

An even more complicated situation is demonstrated by two further buttons, that receive an anonymous method handler by clicking on the form with the left or right mouse button, capturing the mouse click position:

procedure TFormAnonButton.FormMouseDown(

Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment