Normally the event handler does not use the 'Sender' parameter so you can
use 'nil' or 'self'.  

If the handler does use the 'Sender' you should use the component your
procedure is trying to emulate.
e.g. If you logic says you want to emulate pressing ButtonA then call the
handler as   ButtonAClick(ButtonA);

HTH

Stephen Bertram

-----Original Message-----
From: Joel van Velden [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 29 November 2000 15:47
To: Multiple recipients of list delphi
Subject: [DUG]: Procedure Problem


Hi there all,

Just 1 newbie question:

How do I run an event-handlers procedure from somewhere else in the program?
ie, What do I give as 'Sender' in 'procedure TForm3.ListBox1Click(Sender:
TObject);'

TIA,
Joel van Velden

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to