Update obj.rst

Tell user to set ext draw width as needed.
This commit is contained in:
Ryan Stachura 2024-10-23 14:02:44 -04:00 committed by liamHowatt
parent 5db24e27e1
commit 1ec9267b71

View File

@ -194,12 +194,15 @@ This behavior can be overwritten with
children to be drawn out of the parent. In addition to this, you must register
the following event callback (this was not required in previous versions).
Note: ``ext_width`` should be the maximum absolute width the children will be
drawn within.
.. code-block:: c
static void ext_draw_size_event_cb(lv_event_t * e)
{
lv_coord_t * cur_size = lv_event_get_param(e);
*cur_size = LV_MAX(*cur_size, LV_HOR_RES);
*cur_size = LV_MAX(*cur_size, ext_width);
}
Create and delete Widgets