Hou to press a button?

How to click a button from a program? Looks like the examples don’t work.
lv_event_send (btn1, LV_EVENT_PRESSED, 0);
This is wrong. Why?

1 Like

If you are looking to click a button you might want to use LV_EVENT_SHORT_CLICKED instead. This is effectively a press+release rather than just a press.

Thanks, but this command don’t working at all.
image

Instead, you need to use
lv_obj_send_event
The manual is outdated.?