image.png

    1. void demo12(){
    2. lv_obj_t * tabview;
    3. tabview = lv_tabview_create(lv_scr_act(), LV_DIR_TOP, 50);
    4. /*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/
    5. lv_obj_t * tab1 = lv_tabview_add_tab(tabview, "Tab 1");
    6. lv_obj_t * tab2 = lv_tabview_add_tab(tabview, "Tab 2");
    7. lv_obj_t * tab3 = lv_tabview_add_tab(tabview, "Tab 3");
    8. lv_obj_t* label1 = lv_label_create(tab1);
    9. lv_label_set_text(label1,"page1");
    10. lv_obj_t* label2 = lv_label_create(tab2);
    11. lv_label_set_text(label2,"page2");
    12. lv_obj_t* label3 = lv_label_create(tab3);
    13. lv_label_set_text(label3,"page3");
    14. }