Hello, I have a control which inherits from a TableLayoutPanel. I add to this control a panel using the Controls.Add function. when i try to change in run time the background of the panel which i added to the TableLayoutPanel the background stays the same a does not change. can someone knows why? thanks.
How are you changing the panel background and does the code in the TableLayoutPanel allows to custom paint the child controls. Can you share some portion of the code for TableLayoutPanel and remember to have the code blocks for code snippets you put in.
Re: unable to redraw inner control 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(connectivityPanels[i, j], i + 1, j + 1);" the part where i change the color: " connectionsPanels.BackColor = connectedColor.BackColor;" thanks
Can you please tell me what do you mean by saying parent relays the paint to thechild or not? how can I know it?
Say when I have control which is a parent control and has some child windows / control then the paint and the messages can flow in 2 direction of parent notifying child and the vice versa. Just look into your case if the paint is correctly getting relayed.