473,385 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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 3 '06 #1
0 1244

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: adam | last post by:
i have custom user control and i'm trying to pass values to custom user control......I need help it seems to me i cannot pass the value to user control from dropdownlist. I have property in a...
1
by: Ed Bick | last post by:
I built a custom control. It has one custom property that I created exposed. What I want to do though is to have the property show as a dropdown with only a limited number of choices for...
0
by: Kay | last post by:
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...
6
by: david | last post by:
I try to use "for" loop to retrieve and assign values in web form. The code is in the following. But it can not be compiled. What I want to do is: txtQ1.Text =...
5
by: Anil Gupte | last post by:
I am trying to use a dataset to assign a display name (one column from a table) and also associate a value (2nd column) to each item in a dropdown combobox. I tried it this way: ...
1
by: --== Alain ==-- | last post by:
Hi, I have a huge problem... My property does not appear in the "propertyGrid" of "test Container", when i test my custom control. Here is the custom control code : namespace...
2
by: R.A.F. | last post by:
Hi, I have a custom control in which i have a collection property named "Columns". this collection property add/remove column objects. in my Column class i have a property named Alignment...
18
by: Academia | last post by:
I let the use modify the text of a combobox and then I replace the selected item with the new text (in Keyup event). But if he sets the Text property to an empty string ("") that sets the...
10
by: LionsDome | last post by:
Hello, I have a vb.net page which a bunch of checkboxes. A user can select a checkbox(s) and hit the submit button to store those values in a SQL Server table. This works fine with no problem...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.