174 views
in GUI Development by

InvalidateViewState() always used in Embedded wizard studio to refresh view screen created by user ,

however if there is an api or example so user can calling it themselves to refresh screen in firmware not only in Embedded wizard studio?

such like variables in Application::Device, user can update them in firmware too...

1 Answer

0 votes
by

Hello Naki,

InvalidateViewState() implements just a mechanism to update the state of a GUI component. It has primarily less to do with the screen update itself (if I understood your question correctly). The screen update is performed automatically when it is needed, so you don't need to worry about it.

Nevertheless, if you want to update the state a GUI component in response to state alternation within the firmware, you need to notify the GUI about this event. You have two possibilities to do this:

1. Send so-called System Event to the GUI. The GUI components can handle this event and update the state.

2. Use a Property to represent a data value (e.g. voltage, etc.) of the firmware. When the firmware updates this property, the GUI application is again notified.

For more details please see the chapter Implementing a Device Interface as well as the sub-ordinated chapters System Event and (Device Interface-) Property.

I hope it helps you further.

Best regards

Paul Banach

Embedded Wizard Website | Privacy Policy | Imprint

...