Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How does Visual Inheritance work in .Net?
Message
From
19/06/2007 10:40:39
 
 
To
19/06/2007 09:22:04
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01234107
Message ID:
01234274
Views:
17
It's possible that the Font is already being set in the InitializeComponent of the form/control that you dropped the label on (before you put the default and all that in the base wrLabel class) ... the MyForm.Designer.cs. Did you try resetting the font of the label in the Property Sheet of the form/control where you dropped the label?

~~Bonnie



>I am beginning to pull my hair out over this. Nothing I do causes a change in the appearance of the font on the screen. Help- pleassssse.....
>
> [DefaultValue(typeof(Font), "Arial,8pt")]
> public override Font Font
> {
> get { return base.Font; }
> set { base.Font = value; }
> }
>
> public wrLabel()
> {
> InitializeComponent();
> this.Font = new Font("Arial", 8);
> // tried base.font=new Font('Arial',8); but it doesn't change the font on the screen either
> }
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform