Delphi: creating visual controls at run time

In article: <3ucqch$> (Paul Thurrott)

> While I am able to create visual objects (such as BitBtns, Edit boxes and
> the like) at run time, I am unable to get the corresponding Event procedures
> (such as OnClick, etc) to respond.  I have been experimenting recently will
> dynamically allocating the needed controls at Form Load and obviously these
> controls are useless without the corresponding events.  Does anyone out there
> have any insights into how I might implement this?

Assign a procedure to the event property required e.g.

   ComponentName.OnClick := ClickProc ;

procedure ClickProc(Sender : TObject) ;
end ;


Derek A Hordle  Vernal Ltd, Epsom, Surrey, UK.
                These opinions are mine and are not to be considered.