By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

Hiding stock properties on an inherited class

P: n/a
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.
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"Scott Kilbourn" <skilbourn@NO_SPAM_PLEASE.appliedsystems.com> wrote in
message news:eV**************@tk2msftngp13.phx.gbl...
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.

Nov 20 '05 #2

P: n/a
That's what I figured, but I thought I'd check. Thanks for the
confirmation.

"Claes Bergefall" <cl********************@frontec.se> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
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

"Scott Kilbourn" <skilbourn@NO_SPAM_PLEASE.appliedsystems.com> wrote in
message news:eV**************@tk2msftngp13.phx.gbl...
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.


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.