Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > How to implement Drop down list in "properties" box?

Reply
Thread Tools

How to implement Drop down list in "properties" box?

 
 
Oleg Slyuasrchuk
Guest
Posts: n/a
 
      12-10-2003
Hi All,

It may be seem easy, but:

How do I implement a public property that I want to be able to select from a
list of predefined values (at design time)?
Like, for example, "BackColor" in "Apperance" section.( Even without any
extras as a dialog or populating from DB)
Thanks,

Oleg



 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      12-12-2003
Either,

a) specify an enumeration and assign it as the type of the property. This
way it is automatic.

b) If you need more dynamic way you can create a custom typeconverter.

http://msdn.microsoft.com/library/de...econverter.asp

See: Type Converters That Provide a List of Standard Values to a Property
Grid

c). The most powerful way is to create custom editor. See documentation for
design.time features.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Oleg Slyuasrchuk" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi All,
>
> It may be seem easy, but:
>
> How do I implement a public property that I want to be able to select from

a
> list of predefined values (at design time)?
> Like, for example, "BackColor" in "Apperance" section.( Even without any
> extras as a dialog or populating from DB)
> Thanks,
>
> Oleg
>
>
>



 
Reply With Quote
 
 
 
 
Oleg Slyusarchuk
Guest
Posts: n/a
 
      12-12-2003
Thank you, Teemu


I userd the first approach and achieved what I wanted so far.

I'll investigate the "design.time features" topic deeper when I need it.

Regards,
Oleg



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to implement two drop-down list dependency in ASP/HTML/VBscript forms? srini HTML 7 08-30-2010 12:49 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM



Advertisments