Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does Visual Inheritance work in .Net?
Message
De
19/06/2007 16:09:53
 
 
À
19/06/2007 15:39:05
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Divers
Thread ID:
01234107
Message ID:
01234383
Vues:
11
Calvin,

I don't believe you mentioned earlier that you're using MM. There may already be some built-in way of doing that (perhaps that OverrideFont method???), I don't know MM, so I can't speculate on that.

~~Bonnie




>This code does the job--
>using System;
>using System.Collections.Generic;
>using System.ComponentModel;
>using System.Drawing;
>using System.Data;
>using System.Text;
>using System.Windows.Forms;
>
>namespace wrcs
>{
> public partial class wrLabel : OakLeaf.MM.Main.Windows.Forms.mmLabel
> {
>
>
> public wrLabel()
> {
> InitializeComponent();
> }
>
> public override Font Font
> {
> get
> {
> return base.Font;
> }
> set
> {
> base.Font = new System.Drawing.Font("arial", 8);
> }
> }
>
> public Font OverrideFont
> {
> get { return base.Font; }
> set { base.Font = value; }
> }
> }
>}
>
>However, it seems to ALWAYS set the font to whatever is set in the System.Drawing.Font parameters unless you use the OverrideFont property.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform