i did't find any property of a tab container to change background color of the bar that contains the tabs how can i do so?
The background color of a TabControl is inherited from its parent.
Place a panel on the form with the same location and size as the TabControl, put your TabControl inside this panel and set Dock to 'Fill'.
Or the same method in code:
private void Form1_Load(object sender, EventArgs e)
{
Panel tabBackground = new Panel
{
Location = tabControl1.Location,
Size = tabControl1.Size,
// Your color here
BackColor = Color.Magenta
};
tabBackground.Controls.Add(tabControl1);
Controls.Add(tabBackground);
tabControl1.Dock = DockStyle.Fill;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With