1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00
lvgl/examples/widgets/checkbox/lv_example_checkbox_1.py
Gabor Kiss-Vamosi 7bec13c2b9 update asserts
2021-02-08 09:53:03 +01:00

8 lines
291 B
Python

def event_handler(obj, event):
if event == lv.EVENT.VALUE_CHANGED:
print("State: %s" % ("Checked" if obj.is_checked() else "Unchecked"))
cb = lv.cb(lv.scr_act())
cb.set_text("I agree to terms and conditions.")
cb.align(None, lv.ALIGN.CENTER, 0, 0)
cb.set_event_cb(event_handler)