How to change the tab name in a tabview and update the screen with the new name?


I have created a tabview with 2 tabs and I would like to change the name/title on 1 of the tabs.
Since the names are in a button matrix I have found that I can change the name in the like this:

strcpy((char *)ext->tab_name_ptr[0], “Thermostat (ON)”);

Don’t worry the initial name of the tab was longer so that will not over write or corrupt any memory.
This works fine. If there is an easier way please let me know.

The issue I’m having is how to force the update of the name change.
If I press the other tab and then this tab then the name updates. So I know the text changed correctly.

Is there a way to force update of just the button area or the whole screen?


I just tried

lv_event_send(tabview, LV_EVENT_REFRESH, NULL);

but that did not work?

What does LV_EVENT_REFRESH do?

Ok found it. If anyone is interested use.


to refresh the whole screen.


You should only need to invalidate ext->btns. The whole screen does not need to be redrawn.

1 Like