2021-06-07 13:56:08 +02:00
|
|
|
#
|
|
|
|
# Demonstrate how scrolling appears automatically
|
|
|
|
#
|
|
|
|
# Create an object with the new style
|
2023-10-12 20:37:27 +02:00
|
|
|
panel = lv.obj(lv.screen_active())
|
2021-06-07 13:56:08 +02:00
|
|
|
panel.set_size(200, 200)
|
|
|
|
panel.center()
|
|
|
|
|
|
|
|
child = lv.obj(panel)
|
2023-03-10 21:44:12 +01:00
|
|
|
child.set_pos(0, 0);
|
|
|
|
child.set_size(70, 70)
|
2021-06-07 13:56:08 +02:00
|
|
|
label = lv.label(child)
|
|
|
|
label.set_text("Zero")
|
|
|
|
label.center()
|
|
|
|
|
|
|
|
child = lv.obj(panel)
|
2023-03-10 21:44:12 +01:00
|
|
|
child.set_pos(160, 80)
|
|
|
|
child.set_size(80, 80)
|
2021-06-07 13:56:08 +02:00
|
|
|
|
2023-09-14 20:12:31 +02:00
|
|
|
child2 = lv.button(child)
|
2023-03-10 21:44:12 +01:00
|
|
|
child2.set_size(100, 50)
|
2021-06-07 13:56:08 +02:00
|
|
|
|
2023-03-10 21:44:12 +01:00
|
|
|
label = lv.label(child2)
|
2021-06-07 13:56:08 +02:00
|
|
|
label.set_text("Right")
|
|
|
|
label.center()
|
|
|
|
|
|
|
|
child = lv.obj(panel)
|
2023-03-10 21:44:12 +01:00
|
|
|
child.set_pos(40, 160)
|
|
|
|
child.set_size(100, 70)
|
2021-06-07 13:56:08 +02:00
|
|
|
label = lv.label(child)
|
|
|
|
label.set_text("Bottom")
|
|
|
|
label.center()
|
|
|
|
|