Re: fonts by Gabriel
Gabriel
Mon Apr 04 05:44:44 CDT 2005
In the constructor set the font for the control and override the font
property and leave out the setter.
public MyTextBox()
{
InitializeComponent();
}
public override Font Font
{
get
{
return base.Font;
}
}
private void InitializeComponent()
{
this.Name = "MyTextBox";
this.Font = new Font("Tahoma",8);
}
Gabriel Lozano-Morán
"David Sobey" <dsobey@NOSPAMugrad.unimelb.edu.au> wrote in message
news:4250717c@dnews.tpgi.com.au...
> anyone know a simple way to make a font property persist for a custom
> control?
>
> cheers
> dave
>