Jump to content
Ian Branch

Connecting Actions query..

Recommended Posts

Hi Team,

Based on Ray Koonopka's presentation in the 2023 Delphi Con, I thought I would have a look at Actions via an ActionList..

All seems fine with one exception..

When I connect an Action to a Button, the Actions 'OnExecute' event gets inserted into the button's 'OnClick' event.

Is this normal/correct?

Is it OK to leave there?

 

Regards & TIA,

Ian

Share this post


Link to post
30 minutes ago, Ian Branch said:

When I connect an Action to a Button, the Actions 'OnExecute' event gets inserted into the button's 'OnClick' event.

Is this normal/correct?

Is it OK to leave there?

Yes

Share this post


Link to post

That's the basic idea: You implement the code in the Actions OnExecute event instead of the Buttons OnClick event. That allows to use the same code for multiple controls (f.i. Buttons) spread over different forms or frames.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×