Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using another forms event procedure

Is there any way to allow one form to use the event procedures from another form?

E.g. I have a form called PongForm and another called ObstPongForm. There is a ticker on PongForm and another one on ObstPongForm. Is it possible to get ObstPongForm to use the code from PongForm's 'tick' event in it's own 'tick' event? Maybe by letting ObstPongForm inherit from PongForm?

like image 450
nix Avatar asked Sep 15 '26 16:09

nix


1 Answers

You can simply assign it by code (as long as you have access to both instances):

ObstPongForm.Ticker.OnTick := PongForm.TickerTick;
like image 199
Uwe Raabe Avatar answered Sep 18 '26 19:09

Uwe Raabe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!