Connecting Tech Pros Worldwide Forums | Help | Site Map

Custom control design time property problem.

PT
Guest
 
Posts: n/a
#1: Aug 31 '06
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; }
}



PT
Guest
 
Posts: n/a
#2: Aug 31 '06

re: Custom control design time property problem.


Nevermind, I had some dll refreshing issues.. duh! :)


"PT" <pault@REMOVETHISPLEASEs-digital.comwrote in message
news:eNldnHOzGHA.4648@TK2MSFTNGP04.phx.gbl...
Quote:
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; }
}
>

Closed Thread