Description
I am trying to simulate a press on a textarea without actually pressing the textarea.
Currently I have a button that, when pressed, shows the keyboard and textarea however the LV_EVENT_DEFOCUSED will not work since the textarea has not been pressed.
What MCU/Processor/Board and compiler are you using?
ESP32
What LVGL version are you using?
8.3.8
What do you want to achieve?
Trick the program into thinking the textarea is focused so the LV_EVENT_DEFOCUSED event can trigger in the ta_event_cb
What have you tried so far?
lv_obj_add_state(ta, LV_STATE_FOCUSED);
This sets focus to the text area which is nice however It does not allow the defocus to trigger when pressing off of the textarea.
I have tried this:
lv_event_send(ta, LV_EVENT_CLICKED, NULL);
Which seems to crash the code.
lv_event_send(ta, LV_EVENT_FOCUSED, NULL);
This compiles but does not do what I would like