I have added ten buttons to my list, and I want these ten buttons to trigger the same event, How do I let this event know which button triggered it?Is it possible?
lv_event_get_target(e)
tells you the object that triggered the event. You can use this pointer or lv_obj_get_index(btn)
to get the index among the siblings.
Or if there is label on the label you can get that label with lv_obj_get_child(btn, 0)
and get the label’s text with lv_label_get_text(label)
.
1 Like
Perfect solution to my problem, I match every btn label!
You are my hero!
1 Like