I am making an application using Krypton and I just wondered how you would change the color of a Krypton Panel, I have tried to use BackColor, however this does not work and it does not change the color. The code I am using is:
var newPanel = new KryptonPanel();
newPanel.Name = "newPanel";
newPanel.Width = 500;
newPanel.Height = 200;
newPanel.Location = new Point(0, (panelCount == 0 ? 0 : lastPanel.Location.Y) + (panelCount == 0 ? 0 : newPanel.Height) + 0);
newPanel.BackColor = Color.Aqua;
drivesPnl.Controls.Add(newPanel);
If anyone could help with this, it would be greatly appreciated.
Most Krypton controls provide more options for colors and other visualization properties which can be customized for different states of the control (normal, disabled, pressed, tracking, etc.) *
As a result, the
BackColorproperty (along with other standard WinForms properties) have no effect on the control and you won't even find them in the Properties Window (because they're replaced with the new options mentioned above).To change the back color of a
KryptonPanelcontrol for all states, you should use the following:Or you can change it manually at design-time using the Properties Window by expanding the
StateCommongroup and selecting a color forColor1.* The supported states might differ from one control to another. E.g., a
KryptonPaneldoesn't haveStateTrackingorStatePressed.