Connecting Tech Pros Worldwide Help | Site Map

Custom control design time property problem.

  #1  
Old August 31st, 2006, 10:35 AM
PT
Guest
 
Posts: n/a
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; }
}


  #2  
Old August 31st, 2006, 11:55 AM
PT
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Control Design Mode Problem Matt Fielder answers 10 November 22nd, 2005 11:01 PM
Custom Server Control Can't read design time property Shimon Sim answers 7 November 19th, 2005 05:02 PM
Design-time property error scpedicini@yahoo.com answers 0 November 17th, 2005 11:24 AM
Custom Control Design Mode Problem Matt Fielder answers 10 September 14th, 2005 04:05 AM