473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

show properties of a control in property window

Hi,
I am writing a control myTextbox (simply a new class, which inherits class TextBox).
myTextbox class has property DataControlTyp, which is a enumeration: Now when I select this control in design window, I want to see this property as a list (combobox) in property window, to set a value to it.

How can I do it? Following is my code.

Thanks
Nhan
public enum enumDataControlTyp : short

{

DataControlTyp_Yes = -1,

DataControlTyp_None = 0,

DataControlTyp_Yes_xxx = 1

}

public class myTextbox : System.Windows.Forms.TextBox

{

protected enumDataControlTyp m_tDataControlTyp = enumDataControlTyp.DataControlTyp_Yes_xxx;

public enumDataControlTyp DataControlTyp

{
get { return m_tDataControlTyp; }

set { m_tDataControlTyp = value; }
}

}

Jul 25 '08 #1
3 1610
That should be all you have to do. Try reloading VS if it isn't
appearing...

Marc
Jul 25 '08 #2
No, I cannot see it. I have also property DataField in the class, it appears
in the prop window. The prop DataControlTyp is not to see.

public string DataField

{
get { return m_sDataField; }
set { m_sDataField = value; }

}

"Marc Gravell" <ma**********@gmail.comwrote in message
news:15**********************************@z26g2000 pre.googlegroups.com...
That should be all you have to do. Try reloading VS if it isn't
appearing...

Marc

Jul 25 '08 #3
OK, now I have it.
My myTextbox inherrits from a abstract class, which inherits form the class
Textbox.
It can be, that I must restart my computer :-) ?

But now I can see it. Thanks
"Marc Gravell" <ma**********@gmail.comwrote in message
news:15**********************************@z26g2000 pre.googlegroups.com...
That should be all you have to do. Try reloading VS if it isn't
appearing...

Marc

Jul 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: cefrancke | last post by:
I have set the Startup properties to the following... All menus, toolbars, etc are turned off plus these are unchecked Allow Full Menus Allow Built-in Toolbars Allow Default Shortcut Menus...
3
by: Guy Harwood | last post by:
Hi, I have designed a textbox that inherits from the System.Windows.Forms.Textbox control. when the control is readonly the back color changes to a light blue to indicate that it is frozen. ...
10
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
1
by: Jay Douglas | last post by:
I need help getting the collections to show up in the property window of a user control. I want to be able to edit the collection items just like any other asp.net control that has collection...
5
by: Guy | last post by:
Guys Hope someone can help me! I'm having real problems getting properties I type against a control I have written at design time I have written a control by inheriting from the Button control....
1
by: 2G | last post by:
Hi, I have a usercontrol with a custom propertie but in the designer, the properties doesn't expand it's properties so I can't change them. I've search google on this and came across things like...
27
by: Just Me | last post by:
I made a Usercontrol that must have AutoScroll set to true when it is used. So I set it to True in the Load event. However the property still shows in the properties window when the control is...
11
by: Brent Ritchie | last post by:
Hello all, I have been using C# in my programming class and I have grown quite fond of C# properties. Having a method act like a variable that I can control access to is really something. As...
0
by: mpar16 | last post by:
Hi i needed help me to retrieve properties of a control, i got a scenario to read all available properties and its current assigned values for different controls in project. i tried with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.