What is the main difference in these events? I’ve been using onActionPerformed. But, noticed is some sample projects users were using onClick.
onClick only captures clicks. onActionPerformed will fire whenever the button is fired (whether it’s triggered by a click or a keypress) and onActionPerformed is also ‘aware’ of the enabled state of the component.
Thanks Paul
Just a quick note from testing this in Ignition 8.1.
When a Perspective Button has props.enabled = false, it completely prevents interaction with the button. In my test, onClick was not triggered either by mouse click or by keyboard interaction.
However, when the button is enabled, onClick can also be triggered from the keyboard using Tab + Enter, not only by mouse click.
So in 8.1, I would not describe onClick as ignoring the enabled state. Disabled still blocks it.