Trigger an action from a button click event

This exercise describes how to use a Click event to trigger an action when the button on a form is pressed.

To trigger an action on the click of a button:

  1. Select the button and then open the Events page in the Properties pane:
  2. Events define the interaction between the user and a control. The mouse can be used, for example, to click a button or give focus to a button. Scripts can be associated with an event to trigger other events or actions.

  3. Double-click on the Click event to open the Scripts panel.
  4. In this simple example, the Click event is used to increase the font size of a label in the form:

  5. When you Save your changes and Run the form:
  6. Clicking on the Increase Font Size button will trigger the action defined by the script, increasing the font size of the label above it by 2 points:

Trigger an action with the Button Wizard