In this action, the background (bgcolor
) option of the Save
button is changed when the mouse pointer hovers over it. When the mouse pointer moves off the button, the color reverts to the default. The following steps show how to change the color of a button, but other effects are possible. For example, setting the text color within a field or label, or changing the cursor type from an arrow to a hand.
To change the color of a button on mouse over:
- Select the Save Button from the palette and add it to the form.
The Properties window opens.
- For this example, no changes to the Properties window are required. Click OK to close the Properties window.
- Right-click on the Save Button and select Action Editor -> Custom Action Editor from the menu.
The Action Editor window opens.
- From the Option dropdown menu, click bgcolor.
- Click Quick Start and select On Mouse Over Change Color from the list.
The Action Editor displays the On Mouse Over Change Color template, and highlights the word "color1".
- Click Colors, select a color, and then click OK to close the Color window.
- Press Tab.
The Action Editor highlights "color2".
- Click String and from the menu click << Empty String .
- Click Apply and then OK.
The completed action should appear as follows:
mouseover == 'on' ? '#FF0000' : ''
Click the Viewer
tab to test the action. When the mouse cursor hovers over the button, the background color switches to the color selected in the action.
Parent topic: Action Editor