473,748 Members | 6,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Property with drop down options

2 New Member
Hi
Can any body help me plz in creating a property with drop down options visible in Property Window
I am using C# 2.0

I will be very thankful for +ve response

Regards
Zahid
Apr 6 '07 #1
3 1043
MMcCarthy
14,534 Recognized Expert Moderator MVP
This question is being moved to the .NET forum.

ADMIN
Apr 6 '07 #2
graphicsfriend
2 New Member
If I understand you correctly all you need to do is something like the following.
Expand|Select|Wrap|Line Numbers
  1. class MyClass
  2. {
  3.  
  4.   private string myString;
  5.  
  6.   public string MyString
  7. {
  8.   get
  9.   {
  10.       return this.myString;
  11.   }
  12.  
  13.    set
  14.    {
  15.        this.myString = value;
  16.     } 
  17. }
The code above will make MyString Visable to the property editor.

Hi
Can any body help me plz in creating a property with drop down options visible in Property Window
I am using C# 2.0

I will be very thankful for +ve response

Regards
Zahid
Apr 6 '07 #3
Motoma
3,237 Recognized Expert Specialist
The IDE provides autocompletion for properties: type prop and hit tab a few times to cycle through the fields.
Apr 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
15418
by: Greg Scharlemann | last post by:
I am attempting to populate a drop down menu based on the selection of a different drop down menu. However, it is not working correctly, I cannot figure out for the life of me what exactly happens because I am not getting any errors on the page. <html> <script language="javascript"> var phaseArray = new phaseArray(4); var phaseTypeId = new phaseTypeId(4); var phaseId = new phaseId(4);
1
6364
by: Greg Scharlemann | last post by:
I would like to automatically populate a drop down menu when the page loads based on the selection of an item in a different drop down menu. I made a test page that when drop down #1 changes, drop down #2 populates. Does anyone know how to get drop down #2 to populate based on what is selected in drop down #1 when the page loads? Here is my test code: ************************************************************************ <html>...
3
23328
by: Darren | last post by:
Please Help Me!! I've created a typical <form> and a <select> element. The options are created dynamically from my access database (using asp). There are about 70 options, and when you click the dropdown button, it shows about 25 (depending on screen resolution) and then the gives you a scroll bar to get to the rest. My question is, can I limit the number of options shown when you click
3
1484
by: Ben | last post by:
I have two drop down box's in a form, how would I go about changing the options of the seccond one depending on what option is selected in the first one? For example, if there's a drop down box with "a", "b" and "c" as the options, and another drop down box with "1", "2" and "3" as the options; then when you select "a" on the first drop down box the values of the seccond one changes to "a1", "a2" and "a3". This should work for all the...
6
4129
by: MP | last post by:
Hello I want to have a public property (and Brows able) in one control, I use this code: public System.Windows.Forms.Form recordForm get { return _recordForm;} set {_recordForm = value;}
3
3204
by: excel_hari | last post by:
Hi, I couldnt locate a Classic ASP group hence posting here. One of my colleagues has designed an intranet site and one of the pages has a drop-down box with close to 300 options. I want to navigate to the desired option quickly just by typing out the name. For example if I want to choose "Other" (All the options are arranged alhabetically within the Drop-down box) from Drop-down and if I Type "O" then I navigate to first entry with...
2
1097
by: ECVerify.com | last post by:
I am trying to make a property that creates a drop down control that I can fill with string options..."test1", "test2", "test2" I can make one with True false as shown here but I cant figure out how to make it do a dropdown with custom strings Private _numericTextBox As Boolean = False <Category("MyCategory"), Description("Sets the text box as
2
2607
by: gk | last post by:
i want to have 2 dpendent drown box. one for country , and the other for city. if you change country in box1 , the city list will also change in box2.. How to do it in javascript ? can you provide an example with few dumy country name and their cities.
2
3066
by: ponyeyes | last post by:
Hi There, I am a bit of a newbie to PHP programming and I would like to know how I can place a selected drop down option into a PHP variable and then produce an sql query which incorporates this variable. I have created a dynamic drop down menu that populates itself with data from a MySQL table. I now want it to populate a second drop-down menu with relevant options from my database, based upon a query using a variable. For example........
1
5954
by: abTech | last post by:
Have struggled a lot to get a filtered drop down in the normal html and that too editable ... i have used table like auto-completion etc ... This is the simplest solution for a filtered drop down <SELECT NAME="drop" id='drop' onkeyup="editOption(arguments, this)" style='width:100px;cursor:text' mode="1"> <option value="0">Default</option> … </SELECT> Mode 0: Filters the list till a valid match is found, if not found then will behave...
0
8989
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9367
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.