ActionNotificationReceiver

From Xojo Documentation

Revision as of 22:38, 11 November 2019 by PLefebvre (talk | contribs) (Sample Code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Interface


An ActionSource object calls the PerformAction method of each ActionNotificationReceiver registered with it.

Methods
PerformAction

Notes

If you implement this interface in your application, you must implement the methods with the parameters as shown here.

Sample Code

If you want to have a PushButton call PerformAction on an ActionNotificationReceiver then you would create a new class (perhaps ActionNotificationTest) that implements ActionNotificationReceiver. In the PerformAction method, you add the code you want to run when the button is clicked (and before PushButton.Action is called). For example:

MessageBox("PerformAction called.")

Now in the Open event handler for a PushButton, you can add your receiver:

Var action As New ActionNotificationTest
Me.AddActionNotificationReceiver(action)

When the button is pressed, the MessageBox is displayed.

See Also

ActionSource