Remove a grid's frame


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

Currently native_sim provided by the Zephyr project, later STM32H562.

What LVGL version are you using?


What do you want to achieve?

I’m nesting grids. There are two cells at the top level

|      |       |
|  #1  |   #2  |

and those cells are filled with another grid.
In #1 I display a bunch of images etc. and in #2 I display buttons to interact with #1.
The intended application has no touch screen, so I’m faking those physical button inputs by expanding the screen with virtual buttons.
My idea is to have a simple defien that allows me to switch between the virtual environment and the actual board.


Unfortunately, those grid add a gray frame.

How do I get rid of the gray frame?

What did I try so far?

lv_obj_t * container = lv_obj_create(lv_scr_act());
lv_obj_set_style_grid_column_dsc_array(container, col_dsc, 0);
lv_obj_set_style_grid_row_dsc_array(container, row_dsc, 0);
lv_obj_set_size(container, SCR_RES_X+BTN_RES_X, SCR_RES_Y);
lv_obj_align(container, LV_ALIGN_TOP_LEFT, 0, 0);
lv_obj_set_layout(container, LV_LAYOUT_GRID);
lv_obj_clear_flag(container, LV_OBJ_FLAG_SCROLLABLE);

lv_obj_set_style_radius(container, 0, LV_PART_MAIN);
lv_obj_set_style_pad_all(container, 0, LV_PART_MAIN);
lv_obj_set_style_pad_column(container, 0, LV_PART_MAIN);
lv_obj_set_style_pad_row(container, 0, LV_PART_MAIN);

The nested grids are similar.