[RESOLVED] [2005] Custom Property Options
I have read through many of the previous posts about custom properties but can't seem to find one that deals with my issue. I have a custom control that has custom properties. I understand how to get and set properties, but one of my properties needs to be set to either "in" or "mm". I want to property to display a drop-down menu when selected so the developer can select either "in" or "mm". Can someone offer any guidance? I appreciate all responses.
Re: [2005] Custom Property Options
Declare an eneumeration with those values and then declare your property of that type:
vb.net Code:
Public Class UserControl1
Private myField As MyEnumeration
Public Property MyProperty() As MyEnumeration
Get
Return myField
End Get
Set(ByVal value As MyEnumeration)
myField = value
End Set
End Property
End Class
Public Enum MyEnumeration
[in]
mm
End Enum
Re: [2005] Custom Property Options
Superb. Thank you! :wave: