PC Review


Reply
Thread Tools Rate Thread

Custom control design time property problem.

 
 
PT
Guest
Posts: n/a
 
      31st Aug 2006
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; }
}


 
Reply With Quote
 
 
 
 
PT
Guest
Posts: n/a
 
      31st Aug 2006
Nevermind, I had some dll refreshing issues.. duh!


"PT" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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; }
> }
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Control Design Time Property Selector =?Utf-8?B?Q29jbw==?= Microsoft Dot NET Framework Forms 1 11th May 2006 03:23 PM
Custom Server Control Can't read design time property Shimon Sim Microsoft ASP .NET 7 3rd Aug 2005 02:08 AM
can a custom control have an image property that can be set in design time from the property browser? news.austin.rr.com Microsoft Dot NET Compact Framework 3 3rd Mar 2005 02:08 AM
Custom control property fails to persist at design time =?Utf-8?B?SGFyc2hhZCBSYXRob2Q=?= Microsoft Dot NET Framework Forms 1 5th Dec 2004 07:29 PM
Custom Control Design Time Property Options Dave Microsoft C# .NET 1 5th May 2004 03:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:55 AM.