if you are using the Push Button widget, you change the text of the button (the label) by modifying its property Label. For example, if you want the text tio toggle each time the user activates the button, implement following code in the slot method connected the Push Button's OnActivate property:
if ( PushButton.Label == "ON" )
PushButton.Label = "OFF";
PushButton.Label = "ON";
If you have created youz own Push Button (e.g. based on the provided templates), you have surely added a Text View to the push button to display the label. You should also add a property (named e.g. Label or Caption) to the Push Button and in the OnSet method of the property implement code to relay the text:
// The value doesn't change - nothing to do.
if ( pure Label == value )
// Remember the property's new value.
pure Label = value;
// Now you can store the text in the text view
Text.String = value;
If both aspects above do not address your application case, please explain it more in detail.
Ok, it is more clear now. You want the GUI to react to an event generated by GPIO. For this purpose let me refer to the articles Integrating with the device and Device Class and Device Driver, both are part of our online documentation. They explain all basics about natvie code and the integration of external software APIs or hardware drivers.
In case of hardware buttons, however, I would follow another approach. Embedded Wizard implements an infrastructure and interfaces to allow the GUI application to be controlled by keyboard or event hardware buttons. From the GUI point of view you handle such events by the so-called Key Press Handler. From the integration point of view, you can feed the keyboard (or hardware button) events to the GUI application as explained in the chapter Main-Loop. Please note there the usage of the function CoreRoot__DriveKeyboardHitting().
Regarding the component templates, there is no limitation for the Free edition. The unique limitation of Free affects the max. size of the project.
Does it help you further?
within many Build Environments (e.g. STM32 or NXP LPC / iMXRT) there is an example "DeviceIntegration" which demonstrates how to change the GUI content when a hardware button (via GPIOs) is pressed. The example is located within the folder /Examples/DeviceIntegration. Unfortunately, this example is not provided for the ESP-WROVER-KIT.
Maybe you have the chance to see how it works on one of the STM or NXP boards.
Anyhow, as already mentioned, please have a look to the articles Integrating with the device and Device Class and Device Driver, both are part of our online documentation.
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!