Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does Visual Inheritance work in .Net?
Message
De
19/06/2007 13:18:16
 
 
À
19/06/2007 13:00:43
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:
01234325
Vues:
13
I think I can see now that I will not be able to do what I wanted without going to a LOT of trouble. I had hoped that I would be able to change all instances of controls already placed on forms by changing the font etc in the class. .Net apparently does not work in this way. Thanks for the help. I am sure that I will be asking (hopefully on other topics) again.

Well, they key is to get the subclass the way you want it first.

As Bonnie and I both said, if you dropped subclass controls on the form before you get your subclass "right", Winforms will generate code for things like color and font, etc., in the form. The main key to preventing Winforms from doing it is to use the "base" identifier in the code I mentioned yesterday. Once you get the subclass correct, then it should be smoother sailing. (But yeah, at this point, you're either better off going into the InitializeComponent and removing the generated code, or removing the controls and starting over)

Kevin






Again, thanks!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform