I believe you also need to use the DefaultValue attribute on the Property:
[DefaultValue(typeof(Font),"Verdana,8pt")]
public override Font Font
{
get { return base.Font; }
set { base.Font = value; }
}
~~Bonnie
>Hi, Calvin
>
>The reason for this, is that when you drop subclassed controls onto a form, the Winform designer will generate code in the form for some of the standard display properties (like font). So if you go back and change the subclass, it won't be reflected on the form, because the Winform designer already generated the code.
>
>I wrote an article in CoDe Magazine on this....I covered this on the fifth page...
>
>
http://www.code-magazine.com/article.aspx?quickid=0703092&page=5>
>
>Essentialy, in the subclass, you can't just simply set the font property. You have to do something a bit more elaborate...
>
>
>override public Font Font
>{
> get { return base.Font; }
> set { base.Font = value; }
>}
>
>public MyLabelClass()
>{
> base.Font = new Font("Verdana",8);
>}
>
>
>Hope that helps...
>Kevin