lv_tabview.h

API reference for lv_tabview.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_tabview_private.h

Functions

lv_tabview_set_tab_text

Change the name of the tab

 
void lv_tabview_set_tab_text(lv_obj_t *obj, uint32_t idx, const char *new_name)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a tabview widget
idxuint32_tthe index of the tab to rename
new_nameconst char *the new name as a string

lv_tabview_set_tab_translation_tag

Add a tab with a translation tag to the tabview.

 
lv_obj_t * lv_tabview_set_tab_translation_tag(lv_obj_t *obj, const char *tag)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a tabview widget
tagconst char *translation key used for the tab label; will be displayed on the tab bar

Returns: lv_obj_t * — the widget where the content of the tab can be created

lv_tabview_set_active

Show a tab

 
void lv_tabview_set_active(lv_obj_t *obj, uint32_t idx, lv_anim_enable_t anim_en)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a tabview widget
idxuint32_tthe index of the tab to show
anim_enlv_anim_enable_tLV_ANIM_ON/OFF

lv_tabview_set_tab_bar_position

Set the position of the tab bar

 
void lv_tabview_set_tab_bar_position(lv_obj_t *obj, lv_dir_t dir)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a tabview widget
dirlv_dir_tLV_DIR_TOP/BOTTOM/LEFT/RIGHT

lv_tabview_set_tab_bar_size

Set the width or height of the tab bar

 
void lv_tabview_set_tab_bar_size(lv_obj_t *obj, int32_t size)
Parameters
NameTypeDescription
objlv_obj_t *pointer to tabview widget
sizeint32_tsize of the tab bar in pixels or percentage. will be used as width or height based on the position of the tab bar)

Enums

_lv_property_tabview_id_t

NameValue
LV_PROPERTY_TABVIEW_TAB_ACTIVE(LV_PROPERTY_TABVIEW_START + ((int) 0 )) | (( 1 ) << 28 )
LV_PROPERTY_TABVIEW_TAB_BAR_POSITION(LV_PROPERTY_TABVIEW_START + ((int) 1 )) | (( 1 ) << 28 )
LV_PROPERTY_TABVIEW_END

Variables

lv_tabview_class

 
const lv_obj_class_t lv_tabview_class

Dependencies

How is this guide?

Last updated on

On this page