Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does Visual Inheritance work in .Net?
Message
 
 
À
20/06/2007 12:42:50
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:
01234537
Vues:
11
Hi, Pertti
>
>Thank you for your response -- since you have clearly worked with .NET a lot more than I have, you have a much better understanding of it (warts and all), I'm sure.

Yes, I've been working with it for many years and I know a lot of dirty stuff, but plenty of good stuff, too.

To make the point clear: .NET handles OOP almost by the book (more than that would be Smalltalk, but I'll get back later to this). Here is an really simple example:
public class BigLabel : Label {
   public BigLabel() {
      Font = new Font("Verdana", 24);
   }
}
Drop this into a Winform and you have a big label as you might expect.

That being said, when you try to do this over the designers things may vary. A lot of people are better at Winforms than me (Bonnie been the Almighty Wizard). I try to avoid doing UI stuff as much as I can, except now with WPF, which is just great. Wit the designers, you can get some weird things going on that resemble the same that happens to you if you do that in VFP:

1 - create a label subclass - FontName = Courier
2 - drop an instance on a form
3 - change the FontName to Arial, then back to Courier, but manually, not with "reset to default"
4 - go change the subclass label to Font = Times Roman (ugh)
5 - go back to the form - hey! it didn't change! 8-)

Yes, with the designer this can be trickier, but not soooo much, really.

Now, back to Smalltalk (a topic I DO like), you may take a look at:
http://vistascript.net/

Smalltalk running on Silverlight, yeah!!!

Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform