Hi, I have inherited the TabControl in Visual C#.Net 2005.
I have also overridden the OnControlAdded event:
Code:
protected override void OnControlAdded(ControlEventArgs e)
{
e.Control.BackColor = Color.Lime;
base.OnControlAdded(e);
}
As shown above, a default color (lime) is defined for my custom control.
If I change the default color (for example: from 'lime' to 'blue') by modifying the concerned code line:
- (Note): I will first need to 'start debug' at least 1 time for the "Form.cs [Design]" to show the change in color in all of my tab pages.
- However even if the "Form.cs (Design)" might show tab pages with the new color,
in debug mode/even if I release my project, the old color will still be shown
at runtime.
- That 'new color' change will only be reflected in all of my tab pages in all tabcontrols (in debug mode/when released) only if I: add a new tab to my tabcontrol in form(design), or if I drag a new custom tabcontrol to my form.
Does anyone know why this is happening? Any Solution?