Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does Visual Inheritance work in .Net?
Message
De
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:
01234373
Vues:
10
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.
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform