By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,127 Members | 1,160 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,127 IT Pros & Developers. It's quick & easy.

How do I assign values to a property of a custom control which has a dropdown style

P: n/a

I have developed a web custom control, I want one of the properties of the
control to appear as a dropdown list so the user can select from the list.
My question is: how do I define an editor to fill up the dropdown list, so
far I have the following code which displays the property as a dropdown but
I do not know how to get values it to it, I have only 3 values.

Public Class EntryModeEditor
Inherits System.Drawing.Design.UITypeEditor

Public Overloads Overrides Function GetEditStyle(ByVal context As _

System.ComponentModel.ITypeDescriptorContext) As _


Return System.Drawing.Design.UITypeEditorEditStyle.DropDo wn

End Function

In the Custom control I have the property defined with the editor as follows

<DefaultValue(""), Description("The behaviour mode of the Wizard
application."), Editor(GetType(EntryModeEditor),
GetType(System.Drawing.Design.UITypeEditor))> _

Public Property EntryMode() As String


Return sEntryMode

End Get

Set(ByVal Value As String)

sEntryMode = Value

End Set

End Property

Thanks in advance for your help.

Feb 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.