471,092 Members | 987 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

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 965
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.