1# Create a Tab view object
2tabview = lv.tabview(lv.scr_act(), lv.DIR.TOP, 50)
3
4# Add 3 tabs (the tabs are page (lv_page) and can be scrolled
5tab1 = tabview.add_tab("Tab 1")
6tab2 = tabview.add_tab("Tab 2")
7tab3 = tabview.add_tab("Tab 3")
8
9# Add content to the tabs
10label = lv.label(tab1)
11label.set_text("""This the first tab
12
13If the content
14of a tab
15becomes too
16longer
17than the
18container
19then it
20automatically
21becomes
22scrollable.
23
24
25
26Can you see it?""")
27
28label = lv.label(tab2)
29label.set_text("Second tab")
30
31label = lv.label(tab3)
32label.set_text("Third tab");
33
34label.scroll_to_view_recursive(lv.ANIM.ON)
35
36