DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    43

    Use named color in combobox with color icon

    I tried to use the following codes to populate a combo box with an enumeration type I defined (RtfColor enumeration for named color such as Red, Blue ...):

    Code:
    this.comboBackColor.DataSource = Enum.GetValues(typeof(RtfColor));
    However, I found that the FontDialog (.Net class) uses a similar combobox with additional color icon next to the named color string. I like this way better than just a list of enumeration values. The color icon shows exactly what the color is.

    Is there any way to do that in C#? That is, a list of icons with associated strings (named color string).

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 6
    Last Post: 03-27-2010, 01:49 AM
  2. Replies: 0
    Last Post: 03-02-2006, 02:59 AM
  3. comboBox question
    By Stan Shankman in forum .NET
    Replies: 2
    Last Post: 09-07-2001, 03:06 AM
  4. ComboBox Value Disappeared Automatically
    By xiao_john@yahoo.com in forum VB Classic
    Replies: 0
    Last Post: 02-20-2001, 01:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links