Neil,
Thanks for the reply. It works, well kind of works. Now it appears I have a different problem. When I right-click the property and select Reset it changes it to Red (or what ever default color is), but when I build the project the instance of the control on the form changes the color property to nothing.
Have you seen something like this?
If I change the property to a different color than the default color the color stays. Does it work correctly for you?
Einar
>Einar,
>
>You need to provide a string as the second parameter for the DefaultValue attribute.
>
>[Category("Appearance")]
>[Description("Specifies the colour of the controls border.")]
>[DefaultValue(typeof(System.Drawing.Color), "255, 0, 0")]
>public Color BorderColor
>{
> get { return _borderColor; }
> set
> {
> if (value != _borderColor)
> {
> _borderColor = value;
> base.Invalidate();
> }
> }
>}
>
>The example above specifies a default colour of Red.
>
>Regards
>Neil
Semper ubi sub ubi.