468,505 Members | 1,785 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

Hiding stock properties on an inherited class

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
2 936
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
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.

Similar topics

6 posts views Thread by thechaosengine | last post: by
4 posts views Thread by Dan | last post: by
2 posts views Thread by Steven Nagy | last post: by
5 posts views Thread by PIEBALD | last post: by
14 posts views Thread by Dom | last post: by
9 posts views Thread by Torben Laursen | last post: by
3 posts views Thread by gieforce | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.