Including glow effects on buttons

Adding glow effects to buttons is a good way of calling attention to them and differentiating them from other buttons on your app's interface.

How to do it...

To include glow effects, perform the following steps:

  1. Drag a button to your card.
  2. Right-click on the button and select Property Inspector.
  3. On the property inspector, select Graphic Effects from the pull-down menu (Basic Properties is the default selection).
  4. Select the type of glow you desire (inner or outer).
  5. Set the properties associated with the outer glow as detailed in the following table:

    The following screenshot gives you an overview of these properties:

  6. Set the properties associated with the inner glow as detailed in the following table:

    The following screenshot gives you an overview of these properties:

How it works...

By using the Graphic Effects section of the property inspector, we can easily change the outer and inner glow properties for buttons. We can also do this programmatically by directly referencing the property reference name. For example, to change the opacity of a button, we simply use the following code:

set the opacity of btn "myButton" to 119