Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to hide inherited property
Message
From
24/02/2006 15:32:57
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
How to hide inherited property
Miscellaneous
Thread ID:
01099033
Message ID:
01099033
Views:
50
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
Next
Reply
Map
View

Click here to load this message in the networking platform