Help needed !


Hi,

I have build a custom combo box control in vb.net. My question is:

I would like to create a property name "CustomFormat" with the given formats in a combo box. e.g

1-TextOnly
2-NumbersOnly
3-URL Only
3-Email Only

Does anyone tell me how can I do that.

Any help would be appreciated.

Thanks
Kash


Answer this question

Help needed !

  • Bassam Basamad

    I would probably first define an Enum with the appropriate values first:

    Public Enum ComboBoxFormat
         Text
         Numeric
         URLs
         Email
    End Enum

    Then, add a property to your comboBox:

    Public Property CustomFormat() As ComboBoxFormat
         Get
              Return localVariableName
         End Get
         Set(ByVal Value As ComboBoxFormat)
              'Implement changes to combobox appearance here.
              localVariableName = Value
         End Set 
    End Property


    and that should get you going...

  • Help needed !