How to Add Button Widget - mchpgfx/legato.docs GitHub Wiki

Microchip Technology How to Add a Button Widget

It’s time to add a new Button widget. You’ll start by working on the user interface created from How to Add Image Widget.

Add a Button

Add a Button widget to the screen. The button widget will provide a control to transition back to screen0.

  1. In the Toolbox under Input, drag the Button widget onto Screen1.

The size of the image is obtained using Source Width and Source Height in Image Properties found at Assets -> Image for close.

Microchip Technology

  1. Use the Object Editor to set its exact size and location. Under Position field, set X to 420 and Y to 10. Under Size field, set Width to 50 and set Height to 50. Set the button Scheme to WhiteScheme. Set Image field to close.

Microchip Technology


Next Step

In this guide, you learned how add a Button widget and set its properties. You also learned that a Button widget can display a icon using a Image asset by setting its Image field. Go to the next guide in this tutorial: How to add Text.


If you are new to MPLAB® Harmony, you should probably start with these tutorials:


Is this page helpful? Send feedback