property drop down control

  • Thread starter Thread starter ECVerify.com
  • Start date Start date
E

ECVerify.com

I am trying to make a property that creates a drop down control that I
can fill with string options..."test1", "test2", "test2"

I can make one with True false as shown here but I cant figure out how
to make it do a dropdown with custom strings


Private _numericTextBox As Boolean = False

<Category("MyCategory"), Description("Sets the text box as
numeric")> _
Public Property NumericTextBox() As Boolean
Get
Return _numericTextBox
End Get
Set(ByVal Value As Boolean)
_numericTextBox = Value
End Set
End Property
 
Try defining an ENUM.. then use the property as that..

Public Enum TestingEnum
Test1 = 0
Test2 = 1
Test3 = 2
End Enum

Private _dropDownProp As TestingEnum = TestingEnum.Test1

<Category("MyCategory"), Description("A drop down property")> _
Public Property DropDownProp() As TestingEnum
Get
Return _dropDownProp
End Get
Set(ByVal Value As TestingEnum)
_dropDownProp = Value
End Set
End Property

I hope that's what u mean't

Rigga.
 
Rigga said:
Try defining an ENUM.. then use the property as that..

Public Enum TestingEnum
Test1 = 0
Test2 = 1
Test3 = 2
End Enum

Private _dropDownProp As TestingEnum = TestingEnum.Test1

<Category("MyCategory"), Description("A drop down property")> _
Public Property DropDownProp() As TestingEnum
Get
Return _dropDownProp
End Get
Set(ByVal Value As TestingEnum)
_dropDownProp = Value
End Set
End Property

I hope that's what u mean't

Rigga.

Perfect, thanks
 
Back
Top