Part of table located outside main window

Hello,

I create simple table:

#define COL_WIDTH 50
#define COL_COUNT 10
#define ROW_COUNT 7

void lv_example_table_A(void)
{
	lv_obj_t* table = lv_table_create(lv_scr_act(), NULL);
	lv_table_set_col_cnt(table, COL_COUNT);
	lv_table_set_row_cnt(table, ROW_COUNT);
	lv_obj_align(table, NULL, LV_ALIGN_CENTER, 0, 0);
	
	for (int i = 0; i < COL_COUNT; i++)
	{
		lv_table_set_col_width(table, i, COL_WIDTH);
	}
	
	for (int i = 0; i < ROW_COUNT; i++)
	{
		for (int j = 0; j < COL_COUNT; j++)
		{
			
			lv_table_set_cell_type(table, i, j, 2);
			char snum[5];
			itoa(j, snum, 10);
			lv_table_set_cell_value(table, i, j, snum);

		}
	}

}

As result I got table pushed to left outside main window. Why I’m getting this and how to solve it?

You can change the 3rd parameter of lv_obj_align function to LV_ALIGN_IN_TOP_LEFT, you will see the whole table.

lv_obj_align(table, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0);