the button send the OnSwitchOn or OnSwitchOff events only when it is activated manually by the user. I suppose that you either:
Option 1: modify the property Checked of the button in response to the event happening from hardware pin), or ...
Option 2: you have connected the button via its Outline property to some property in the Device Interface, which is modified in response to the hardware pin.
In the first case, when you change Checked property, perform also the screen switch operation.
In the second case, add a Property Observer to your component and connect it via its Outlet property to the property in the Device Interface. The implement the OnEvent slot method of the Property Observer. In the OnEvent slot method you can then react to the notification caused by the alternation of the property in the Device Interface.
I hope it helps you further
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!