PT Exorcist
Dec 14th, 2002, 08:42 AM
I have a user control who has a listbox in it. i want that when the user changes the propriety BackColor of the control it automaticly changes the background of the listbox too. It's all ok but when i put the control in the form1 for testing the background appears as "ControlLight" when i've put the defaultvalue as Colors.Red!!!!
[DefaultValue("SystemColors.Red")]
public override Color BackColor
{
get
{
return _backColor;
}
set
{
listBox1.BackColor = value;
_backColor = value;
}
}
[DefaultValue("SystemColors.Red")]
public override Color BackColor
{
get
{
return _backColor;
}
set
{
listBox1.BackColor = value;
_backColor = value;
}
}