Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Format
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00817419
Message ID:
00819977
Vues:
19
Dave,

I guess maybe we misunderstood each other. If you start out with a UserControl with the System TextBox on it, then decide to create your own TextBox base class, how else are you supposed to get your TextBox into that UserControl?

Unless maybe you were talking about a sub-class of the original UserControl inheriting the change to the UserControl, but that's not what I thought you were saying. And, even if that's what you were talking about, it still inherits the change ok. So, I guess I'm still up in the air as to what you were trying to say.

~~Bonnie


>I guess that would be copy-and-paste inheritance.
>
>>Dave,
>>
>>>>For example, you create a user control that contains three textboxes. Then you come up with the smart idea to subclass the textbox to create a mytextbox subclass. If you want your user control to contain three mytextboxes, you can't. You have to throw it away and create a new user control that contains three mytextboxes.<
>>
>>Hmmmmm ... I don't know why you say that. It's quite easy to do without throwing it away and recreating the UserControl, unless I'm misunderstanding what you're saying. All you have to do is edit your UserControl code and change all System.Windows.Forms.TextBox to MyTextbox instead. Unless you're talking about WebForms instead of WinForms, but even so couldn't you do a similar thing?
>>
>>~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform