Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User control - drop down property

Status
Not open for further replies.

s2001

Programmer
Dec 7, 2001
132
US
Hello All,

I have written a class library that extends textbox control. I am using the new extended control to do security validation. What i want to do is to have a drop-down show up in the property window for one of the new field. For example:

--I have a property called Select Role.
--Programmer, in the design time mode, should be able click on the drop down of that property for a list of available roles.

Can someone please guide me?

Let me know if i am not clear.

Thanks a lot in advance.



Thanks,
MB
 
I think that you can do this by using a Enum and property:

Public Enum MyOptions
First
Second
Third
End Enum

Public Property MyOption As MyOptions
Public Get
'Return Something
End Get
Public Set(Value As MyOptions)
'Set Something
End Set
End Property
 
Just tested it on a Inherited text box and it worked for me...
 
Thank you very much. I forgot to mention that i want to tie the list with rows coming out of a data table.



Thanks,
MB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top