acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
lv_example_tabview_1.py (603B)
1 # Create a Tab view object 2 tabview = lv.tabview(lv.scr_act(), lv.DIR.TOP, 50) 3 4 # Add 3 tabs (the tabs are page (lv_page) and can be scrolled 5 tab1 = tabview.add_tab("Tab 1") 6 tab2 = tabview.add_tab("Tab 2") 7 tab3 = tabview.add_tab("Tab 3") 8 9 # Add content to the tabs 10 label = lv.label(tab1) 11 label.set_text("""This the first tab 12 13 If the content 14 of a tab 15 becomes too 16 longer 17 than the 18 container 19 then it 20 automatically 21 becomes 22 scrollable. 23 24 25 26 Can you see it?""") 27 28 label = lv.label(tab2) 29 label.set_text("Second tab") 30 31 label = lv.label(tab3) 32 label.set_text("Third tab"); 33 34 label.scroll_to_view_recursive(lv.ANIM.ON) 35