mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
28 lines
650 B
Python
28 lines
650 B
Python
#!pika
|
|
import pika_lvgl as lv
|
|
import PikaStdLib
|
|
mem = PikaStdLib.MemChecker()
|
|
|
|
cb = lv.checkbox(lv.scr_act())
|
|
cb.set_text("Apple")
|
|
cb.align(lv.ALIGN.TOP_LEFT, 0 ,0)
|
|
|
|
cb = lv.checkbox(lv.scr_act())
|
|
cb.set_text("Banana")
|
|
cb.add_state(lv.STATE.CHECKED)
|
|
cb.align(lv.ALIGN.TOP_LEFT, 0 ,30)
|
|
|
|
cb = lv.checkbox(lv.scr_act())
|
|
cb.set_text("Lemon")
|
|
cb.add_state(lv.STATE.DISABLED)
|
|
cb.align(lv.ALIGN.TOP_LEFT, 0 ,60)
|
|
|
|
cb = lv.checkbox(lv.scr_act())
|
|
cb.add_state(lv.STATE.CHECKED | lv.STATE.DISABLED)
|
|
cb.set_text("Melon")
|
|
cb.align(lv.ALIGN.TOP_LEFT, 0 ,90)
|
|
|
|
print('mem used max: %0.2f kB' % (mem.getMax()))
|
|
print('mem used now: %0.2f kB' % (mem.getNow()))
|
|
|
|
#!pika |