473,385 Members | 1,357 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.

Another Property doubt

I have my custom edit, and i add it some properties. I want that you can "only" select between some predefined options in the properties window.?

this can be? How?

Thanks in advantage.
Nov 15 '05 #1
2 976
Make your property type an enumeration and add your "predefined options" as
enum values.

- this is the easy way.

If you want more flexibility, you should look up UITypeEditor in MSDN

-vJ

"Hector Martinez" <an*******@discussions.microsoft.com> wrote in message
news:D4**********************************@microsof t.com...
I have my custom edit, and i add it some properties. I want that you can "only" select between some predefined options in the properties window.?
this can be? How?

Thanks in advantage.

Nov 15 '05 #2
Make the value an ENUM.
Realize however, that an enum value is basically an integer under the
covers, so people will be able to set the value to something else (outside
the properties browser) unless you also restrict the value in the mutator
(property Set block).

-Rob Teixeira [MVP]

"Hector Martinez" <an*******@discussions.microsoft.com> wrote in message
news:D4**********************************@microsof t.com...
I have my custom edit, and i add it some properties. I want that you can "only" select between some predefined options in the properties window.?
this can be? How?

Thanks in advantage.

Nov 15 '05 #3

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

Similar topics

188
by: christopher diggins | last post by:
I have posted a C# critique at http://www.heron-language.com/c-sharp-critique.html. To summarize I bring up the following issues : - unsafe code - attributes - garbage collection -...
4
by: Leon | last post by:
Why this code is not working? I think the problem is in the business class code. ****My Business Class------------ ' Private variables '- - - - - - - - - - - - - - - - - - - - - - - - - - - - -...
3
by: Vadivel Kumar | last post by:
I have a aspx file which contains a listbox and text box, the functionality what i need here is, when i click that button, a window will opened and it will show lot of details with the checkboxes,...
2
by: Fabiano | last post by:
Please, i have a ASPX that contains two usercontrols, TOP.ASCX and CENTER.ASCX. The first one has a dropdown list inside of it and the second one has a Datalist. When user changes the...
62
by: djake | last post by:
Someone can explain me why to use property get and property set to access a value in a class, insted of access the value directly? What's the usefulness of property statements in VB.NET? Thanks
14
by: Dom | last post by:
Hi all I'm developing a control, and I need to hide some properties to the user. For example, suppose I need Text property to be completely inacessible (from a Form/Code that is into another...
4
by: Mark Olbert | last post by:
I've written a composite custom control which I would like to have update its design-time display when one of several properties changes at design time. These custom properties are not simply the...
16
by: Mike | last post by:
Hi, I have a form with some controls, and a different class that needs to modify some control properties at run time. Hoy can I reference the from so I have access to its controls and...
0
by: sravanthi29 | last post by:
Hi, I am developing a vb.net application in that i have so many textboxes. For these text boxes i have to set tag property ...my doubt is can i set tag property in design mode or else i have...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.