/// <summary> /// Add button into proper table cell. /// </summary> private void AddItemToTabPage(ProductTabPageItem item, TableLayoutPanel tabPageLayout, int tabPageItemIndex) { int row; int column; AppModel.GetArrayEntryRowAndColumn(tabPageItemIndex, TAB_PAGE_LAYOUT_COLUMN_COUNT, out row, out column); tabPageLayout.Controls.Add(item.Button, column, row); item.Button.Dock = DockStyle.Fill; // Make button fill in table cell }