I create a new panel and add it to the tablelayoutpanel.
after adding it I get a the panel which I added earlier and i change it's BackColor property.
I declare a array of panels:
" private Panel[,] connectivityPanels = new Panel[12,12] ; "
the part where i create panels which i put in the tablelayoutpanel:
" connectivityPanels[i, j] = new Panel();
ConnectivityTableLayoutPanel.Controls.Add(connecti vityPanels[i, j], i + 1, j + 1);"
the part where i change the color:
" connectionsPanels[i].BackColor = connectedColor.BackColor;"

thanks