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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top