adding micropython examples (#2286)
* adding micropython examples * adding micropython examples
This commit is contained in:
19
examples/layouts/flex/lv_example_flex_6.py
Normal file
19
examples/layouts/flex/lv_example_flex_6.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# RTL base direction changes order of the items.
|
||||
# Also demonstrate how horizontal scrolling works with RTL.
|
||||
#
|
||||
|
||||
cont = lv.obj(lv.scr_act())
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user