How to disable a tab from tabview

Description

I want to disable or hide a tab from a tabview.
I saw an example but that was based on v7 and the api’s are not in v8 any more

What MCU/Processor/Board and compiler are you using?

Raspberry pi GCC compiled

What LVGL version are you using?

v8.1

What do you want to achieve?

Hide Tab in Tabview

What have you tried so far?

Not create the tab when I do not need it, but I rather hide or disable it

Code to reproduce

The code block(s) should be formatted like:

/*You code here*/

Screenshot and/or video

By default, the tab selector buttons are placed on the top of the Tab view. It can be changed with lv_tabview_set_btns_pos(tabview, LV_TABVIEW_TAB_POS_TOP/BOTTOM/LEFT/RIGHT/NONE)

LV_TABVIEW_TAB_POS_NONE will hide the tabs.
…but probably they hide all tabs…i donty have try

Thanks will try

I don’t think it works, LV_TABVIEW_TAB_POS_NONE is not available in v8. Also the call to lv_tabview_set_btns_pos is not exposed.
I was thinking to get the button matrix and see if I can hide induvidual button.

But any how thanks

With LV_BTNMATRIX_CTRL_HIDDEN you can hide the button.
For now I will use that.

tab_buttons = lv_tabview_get_tab_btns(tabview_mid);
lv_btnmatrix_set_btn_ctrl(tab_buttons, 5, LV_BTNMATRIX_CTRL_HIDDEN);