Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to hide inherited property
Message
De
24/02/2006 15:32:57
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
How to hide inherited property
Divers
Thread ID:
01099033
Message ID:
01099033
Vues:
49
Hi,

How can I hide (or at least make readonly) an inherited property on a windows control subclass and prevent someone from overriding that property at the instance level on a form?

Silly example to illustrate: I have a button subclass and I want the text property to say "Can't Change Me!", so I set that in the constructor of my class - no problem. I want to prevent a programmer from changing that Text when they drop this button on a form. Ideally - the "Text" property shouldn't even show up in the properties window any longer. The button SHOULD display "Can't Change Me!" at runtime?

How can I accomplish this? I have played with ReadOnly and Browsable attributes to no avail so far. Maybe I'm doing something wrong.

Thanks,
Ken B. Matson
GCom2 Solutions
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform