can i do this in a custom control

G

Guest

hey all,

i was wondering, given a user-defined public property of a custom control,
can i present the user of the custom control a drop-down list for the
available options for that public property?

thanks,
rodchar
 
G

Guest

Yes (I am assuming you want it to show up in the IDE and not in the UI),

Create an enum value type like so:

public enum AcceptedValue{
Value1,
Value2,
Value3
}

Now set the property to be of type AcceptedValue. Note that the nature of
enums is to use the first value as the default value if none is specified.
 
B

bruce barker

use an enum.

-- bruce (sqlwork.com)

| hey all,
|
| i was wondering, given a user-defined public property of a custom control,
| can i present the user of the custom control a drop-down list for the
| available options for that public property?
|
| thanks,
| rodchar
 

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,772
Messages
2,569,593
Members
45,104
Latest member
LesliVqm09
Top