• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

Maybe Easy Question about usercontrols

I am creating a usercontrol in which I am using an Enum Type for some of the properties What I am trying to figure out how to do is how do I make the list that comes up at design time use words that cannot be used for variables in an Enum Type

here is what I am trying

Public Enum eAppearance
    None
    o3D
End Enum
Private meAppearance As eAppearance

Public Property Get Appearance() As eAppearance
    Appearance = meAppearance
End Property

Public Property Let Appearance(ByVal thisAppearance As eAppearance)
    meAppearance = thisAppearance
    Call UserControl.PropertyChanged("Appearance")
End Property

When i do this I get this in the list of values i can use

None
o3D

What I want to get is

None
3D

How can I make this work?
Thank You
0
cdthurman
Asked:
cdthurman
  • 4
  • 2
1 Solution
 
nffvrxqgrcfqvvcCommented:
I am almost certain you must always begin with a string.
0
 
cdthurmanAuthor Commented:
That is the problem what I was wondering is, is it possible to make the dropdown list different?
0
 
nffvrxqgrcfqvvcCommented:
I am not going to say "no" because I am not sure, but to my knowledge you can't use an integer(number) to begin. You need to use a string.

You could use: THREE3D
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
danaseamanCommented:
Use brackets to do this:
Public Enum eAppearance
    None
    [3D]
End Enum
0
 
danaseamanCommented:
Note: The brackets do not appear in the IDE Properties. You would also use brackets where you want multiple words such as [Hello World]
0
 
nffvrxqgrcfqvvcCommented:
Its been more than 21 days since a comment has been added. I am going to leave this for clean up.
Recommend: Accept: danaseaman
0
 
nffvrxqgrcfqvvcCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

[Accept: danaseaman comment]

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

egl1044
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now