You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ndg/lib/lvgl/examples/widgets/msgbox/lv_example_msgbox_1.py

11 lines
314 B
Python

def event_cb(e):
mbox = e.get_current_target()
print("Button %s clicked" % mbox.get_active_btn_text())
btns = ["Apply", "Close", ""]
mbox1 = lv.msgbox(lv.scr_act(), "Hello", "This is a message box with two buttons.", btns, True)
mbox1.add_event_cb(event_cb, lv.EVENT.VALUE_CHANGED, None)
mbox1.center()