docs(event): add warning not to modify Widgets during draw events. (#7685)

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
Victor Wheeler
2025-02-07 12:24:00 -07:00
committed by GitHub
parent 56320599cf
commit a5f51bff72

View File

@@ -156,6 +156,14 @@ Drawing Events
- :cpp:enumerator:`LV_EVENT_DRAW_POST_END`: Finishing the post draw phase (when all children are drawn) - :cpp:enumerator:`LV_EVENT_DRAW_POST_END`: Finishing the post draw phase (when all children are drawn)
- :cpp:enumerator:`LV_EVENT_DRAW_TASK_ADDED`: Adding a draw task - :cpp:enumerator:`LV_EVENT_DRAW_TASK_ADDED`: Adding a draw task
.. attention::
In drawing-event callback functions the rendering
sequence has already begun, and during this period, making changes to any
Widget's attributes, styles, or creating/deleting widgets is forbidden. If you attempt to do so,
LVGL will generate an assertion failure with a message
indicating that invalidating an area is not allowed during rendering.
Special Events Special Events
-------------- --------------