T
Turbot
Hello,
I have an ENUM that looks like this:
Public Enum Locations As Byte
Top_Left
Top_Middle
Top_Right
Middle_Left
Middle_Middle
Middle_Right
Bottom_Left
Bottom_Middle
Bottom_Right
End Enum
I am then using the following code to automatically list the enum
members/values in a combo box:
cmbBGStyle.DataSource = [Enum].GetValues(GetType(Locations))
Here is my quandry - As you can see, I have had to place underscores in
the enum member names as I can't have spaces. I was wondering if anyone
knows of an attribute or something that will enable me to display a
friendlier name in the combo box such as 'Top Left', 'Bottom Right'
etc.
I have an ENUM that looks like this:
Public Enum Locations As Byte
Top_Left
Top_Middle
Top_Right
Middle_Left
Middle_Middle
Middle_Right
Bottom_Left
Bottom_Middle
Bottom_Right
End Enum
I am then using the following code to automatically list the enum
members/values in a combo box:
cmbBGStyle.DataSource = [Enum].GetValues(GetType(Locations))
Here is my quandry - As you can see, I have had to place underscores in
the enum member names as I can't have spaces. I was wondering if anyone
knows of an attribute or something that will enable me to display a
friendlier name in the combo box such as 'Top Left', 'Bottom Right'
etc.