How does one assign a handler to handle the OnClick event of a button that
is created at runtime?
The button will be on a component
(Delphi 5)
Many thanks.
Jake Baze
With MyClick beeing defined like a normal event creted in the IDE
Procedure TForm.MyClick(Sender:TObject);
"JakeBaze" <jb...@fenix2.dol-esa.gov> schrieb im Newsbeitrag
news:01c08261$ede636e0$7fc4c8c7@jboon...
procedure TMyObject.MyOnClick(Sender: TObject);
...
var
MyButton: TButton;
...
MyButton := TButton.Create(Owner);
MyButton.OnClick := MyOnClick;
That's all
> Button.OnClick:=MyClick;
Markus Dommann <mdom...@postweb.net> wrote in article
<3A68BE63...@postweb.net>...
> Just do something like:
> MyButton.OnClick := MyOnClick;
Markus
"JakeBaze" <jb...@fenix2.dol-esa.gov> schrieb im Newsbeitrag
news:01c08268$0e83c420$7fc4c8c7@jboon...
You are trying to use a standalone procedure as the handler. That does not
work, the handler has to be a method of some object.
Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: Till Feb.2001 i will only visit the groups on weekends, so be
patient if i don't reply immediately.