mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
c751c11a87
After https://github.com/lvgl/lv_binding_micropython/pull/161 merged, it is no longer needed to cast the result of 'e.get_target()' Also, additional small fixes to allow CI improvements
11 lines
314 B
Python
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()
|
|
|