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

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

P: n/a
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.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

Get

Return sEntryMode

End Get

Set(ByVal Value As String)

sEntryMode = Value

End Set

End Property

Thanks in advance for your help.

Kay.

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

This discussion thread is closed

Replies have been disabled for this discussion.