473,395 Members | 1,516 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,395 software developers and data experts.

Custom control design time property problem.

PT
Hi, I'm creating a library of basic constol that I often use, and am just
getting to the whole custom process, I've started by creating something
simple by inheriting from a textbox, I have two custom properties that I'd
like to be displayed at design time, one which is a bool and works fine and
is displayed, and one which is an enum which doesn't show.

the following is the only code in the derived class.

If anyone could shed light as to why bool would work and enums don't it
would be greatly appreciated.

Regards,

P.

public enum STYLE
{
Default,
Upper,
Lower,
Numeric,
AlphaNum,
AlphaNumUpper,
AlphaNumLower,
}
private STYLE EditStyleBehavior = STYLE.Default;
[
Category("Behavior"),
Description("Input style of the edit box."),
DefaultValue(STYLE.Default)
]
public STYLE EditStyleType
{
get { return EditStyleBehavior; }
set { EditStyleBehavior = value; }
}
private bool AllowNegativeNumerics = false;
[
Category("Behavior"),
Description("Allow negative input for numerical values."),
DefaultValue(false)
]
public bool NegativeNumerics
{
get { return AllowNegativeNumerics; }
set { AllowNegativeNumerics = value; }
}
Aug 31 '06 #1
1 6539
PT
Nevermind, I had some dll refreshing issues.. duh! :)
"PT" <pa***@REMOVETHISPLEASEs-digital.comwrote in message
news:eN**************@TK2MSFTNGP04.phx.gbl...
Hi, I'm creating a library of basic constol that I often use, and am just
getting to the whole custom process, I've started by creating something
simple by inheriting from a textbox, I have two custom properties that I'd
like to be displayed at design time, one which is a bool and works fine
and is displayed, and one which is an enum which doesn't show.

the following is the only code in the derived class.

If anyone could shed light as to why bool would work and enums don't it
would be greatly appreciated.

Regards,

P.

public enum STYLE
{
Default,
Upper,
Lower,
Numeric,
AlphaNum,
AlphaNumUpper,
AlphaNumLower,
}
private STYLE EditStyleBehavior = STYLE.Default;
[
Category("Behavior"),
Description("Input style of the edit box."),
DefaultValue(STYLE.Default)
]
public STYLE EditStyleType
{
get { return EditStyleBehavior; }
set { EditStyleBehavior = value; }
}
private bool AllowNegativeNumerics = false;
[
Category("Behavior"),
Description("Allow negative input for numerical values."),
DefaultValue(false)
]
public bool NegativeNumerics
{
get { return AllowNegativeNumerics; }
set { AllowNegativeNumerics = value; }
}

Aug 31 '06 #2

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

Similar topics

10
by: Matt Fielder | last post by:
I have developed a custom control to be used in my application. My application includes a form designer, so the control can be hosted while designmode for the control is either true or false,...
2
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx....
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....
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
1
by: --== Alain ==-- | last post by:
Hi, I still have problem updating my custom control at design time. When i change a property of my custom control in the property window, i would like to see this change immediately on my custom...
6
by: Rick | last post by:
Hi group, I'm trying to inherit from the windows checkbox control. This is no problem. My goal is to add a property that is based on an enum. When I have an enum declared within the class, it...
5
by: gerry | last post by:
I am trying to create a custom container control that will only ever contain a specific type of control. At design time, when a control of a different type is added to the container I would like...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.