Hi Suarj,
of course, it is not exactly the same - but I thought it could be a helpful example, because the principles are the same:
Instead of using the checkbox as shown in the example, you can use a pushbutton in your application.
Instead of changing the state of the LED as shown in the example, you can change the state of a GPIO in your application.
The example is intended to demonstrate the interaction between a GUI application and the underlying hardware. See also the chapters Integrating with the device and Implementing a Device Interface.
Furthermore, the example shows also the other way: As soon as the state of a GPIO changes (= the hardbutton on the board is pressed), the GUI reflects the new state.
I hope this helps...
Best regards,
Manfred.