472,978 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,978 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 1010
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: thechaosengine | last post by:
Hi all, Is there a way to hide a member in a subclass that has been inherited from a base class? Lets leave aside any issues regarding whether its a good idea for a moment. Here's an example...
7
by: Baski | last post by:
Base class: class AssetBase { string _clli; public string CLLI { get
4
by: Dan | last post by:
I have a need to make a set of classes that all share the same public methods, some implementation and some data. So, I made an abstract base (BaseClass) with an interface (IBaseClass) and a...
7
by: Dennis | last post by:
I have a class named myclass that inheirits from "baseclass". There is a property of "baseclass" that I don't want exposed in the IDE. The MSDN documentation says" "A derived type can hide an...
2
by: Steven Nagy | last post by:
Hi all, How would I go about hiding an inherited property? In particular, I want to hide the 'BackColor' property of the UserControl class. I will then implement my own back color related...
5
by: PIEBALD | last post by:
I was trying to break some polymorphism, expecting it not to work, but I'm a curious sort. I was seeing what happens when a derived class tries to hide an inherited method with a private new...
10
by: Smokey Grindle | last post by:
i want to inherit the list view class, but in the inherited class, hide the Header style property and the view property (basically its a detailed list with always clickable headers) how do I keep...
14
by: Dom | last post by:
Hi all I'm developing a control, and I need to hide some properties to the user. For example, suppose I need Text property to be completely inacessible (from a Form/Code that is into another...
9
by: Torben Laursen | last post by:
Hi I have a class that I use in Excel to define some custom functions. The problem that I have is that the class also has some building functions that for some reason is there: ToString...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.