Abount button's sub widget event


I create canvas obj in button obj. I can’t receive clicked event when I click canvas areas.
So I use lv_obj_set_click(canvas, true) and lv_obj_set_parent_event(canvas, true).
I can receive clicked event now
But I found that the button state didn’t change when I click canvas.
What should I do if I hope button state to be normal while I click on the canvas?

From my understanding, lv_obj_set_parent_event merely sends the event to the parent; it doesn’t perform any special state logic. You should probably use lv_obj_set_click(canvas, false) and just receive the events on the button directly.

Thank you very much!
you have helped me a lot.