您当前的位置: 首页 > 

仙剑情缘

暂无认证

  • 0浏览

    0关注

    333博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

tabview for little vGL

仙剑情缘 发布时间:2020-02-20 20:04:12 ,浏览量:0

  • tabview控件实现
    
    void tabview_demo(void)
    {
        /*Create a Tab view object*/
        lv_obj_t* tabview;
        tabview = lv_tabview_create(lv_scr_act(), NULL);
    
        /*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/
        lv_obj_t* tab1 = lv_tabview_add_tab(tabview, "Tab 1");
        lv_obj_t* tab2 = lv_tabview_add_tab(tabview, "Tab 2");
        lv_obj_t* tab3 = lv_tabview_add_tab(tabview, "Tab 3");
    
        lv_tabview_set_btns_hidden(tabview, true);  //隐藏tabview按钮
        /*Add content to the tabs*/
        lv_obj_t* label = lv_label_create(tab1, NULL);
        lv_label_set_text(label, "This the first tab\n\n"
            "If the content\n"
            "of a tab\n"
            "become too long\n"
            "the it \n"
            "automatically\n"
            "become\n"
            "scrollable.");
        label = lv_label_create(tab2, NULL);
        lv_label_set_text(label, "second Tab");
    
        label = lv_label_create(tab3, NULL);
        lv_label_set_text(label, "Third tab");
    
    }
  • 调用tabview_demo函数,编译运行

关注
打赏
1658017818
查看更多评论
立即登录/注册

微信扫码登录

0.0444s