P
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; }
}
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; }
}