How do I assign values to a property in a custom control that has a dropdown style

K

Kay

Hello,

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 _

System.Drawing.Design.UITypeEditorEditStyle

Return System.Drawing.Design.UITypeEditorEditStyle.DropDown

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

Get

Return sEntryMode

End Get

Set(ByVal Value As String)

sEntryMode = Value

End Set

End Property



Thanks in advance for your help.

Kay.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top