How to understand the grid sizes


I’m using Grids.
I use lv_obj_set_size to set the object size and I use lv_obj_set_style_grid_column_dsc_array and lv_obj_set_style_grid_row_dsc_array for the columm and rows.

later I use lv_obj_set_grid_cell with LV_GRID_ALIGN_STRETCH

My problem is on how to play with grid object size and the col and rows size, so I will not get need of scrolling or clamping the elements?

I was expecting that LV_GRID_ALIGN_STRETCH adjust the size of elements so it will respect the grid col and row size, but it does not look to work like that.

Any hint?

What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?


What do you want to achieve?

What have you tried so far?

Code to reproduce

Screenshot and/or video