mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
20 lines
427 B
Python
20 lines
427 B
Python
#
|
|
# RTL base direction changes order of the items.
|
|
# Also demonstrate how horizontal scrolling works with RTL.
|
|
#
|
|
|
|
cont = lv.obj(lv.screen_active())
|
|
cont.set_style_base_dir(lv.BASE_DIR.RTL,0)
|
|
cont.set_size(300, 220)
|
|
cont.center()
|
|
cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)
|
|
|
|
for i in range(20):
|
|
obj = lv.obj(cont)
|
|
obj.set_size(70, lv.SIZE_CONTENT)
|
|
|
|
label = lv.label(obj)
|
|
label.set_text(str(i))
|
|
label.center()
|
|
|