Hi folks,
I am trying to create a library of custom controls by inheriting from existing windows Controls. The Control I would like to inherit from first is the Windows pushbutton.
I have managed to create the new class. However I want to change the default font to Arial.
Here is my code:
namespace JPNControls { public partial class JPNbutton : Button { public JPNbutton() { InitializeComponent(); } protected override void OnPaint(PaintEventArgs pe) { base.OnPaint(pe); b.Dispose(); } } }
Whereabouts do I set the font to Arial ? I have tried using this.font, base.font all without success. Once I know how to achieve this on a button, I should be able to to repeat on all the other controls in the library.
Thanks,
John
jppnn