Hiding stock properties on an inherited class

  • Thread starter Thread starter Scott Kilbourn
  • Start date Start date
S

Scott Kilbourn

Hi,

I am working on a control that inherits System.Windows.Forms.TextBox. Of
course one of the properties of a TextBox is the Text property. I would
like to replace this property with a property named DatabaseText. I do not
want the Text property to show up in the properties window, and I don't want
it accessible at runtime or designtime.

Any ideas?

Thanks.
 
You can't prevent it from being accessible but you can hide it
in the designer and the IntelliSense list by applying the
Browsable and EditorBrowsable attributes. Set them to
False and EditorBrowsableState.Never resp.

/claes
 
Back
Top