-
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函數,編譯運行
tabview for little vGL
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.