2021-06-07 13:56:08 +02:00
|
|
|
def event_cb(e):
|
2023-02-20 20:50:58 +01:00
|
|
|
mbox = e.get_target_obj()
|
2023-09-14 20:12:31 +02:00
|
|
|
print("Button %s clicked" % mbox.get_active_button_text())
|
2021-02-08 09:53:03 +01:00
|
|
|
|
2023-09-14 20:12:31 +02:00
|
|
|
buttons = ["Apply", "Close", ""]
|
2021-02-08 09:53:03 +01:00
|
|
|
|
2023-10-12 20:37:27 +02:00
|
|
|
mbox1 = lv.msgbox(lv.screen_active(), "Hello", "This is a message box with two buttons.", buttons, True)
|
2023-02-20 20:50:58 +01:00
|
|
|
mbox1.add_event(event_cb, lv.EVENT.VALUE_CHANGED, None)
|
2021-06-07 13:56:08 +02:00
|
|
|
mbox1.center()
|
|
|
|
|