Click here to Skip to main content
13,090,426 members (36,158 online)
Click here to Skip to main content
Add your own
alternative version


15 bookmarked
Posted 30 May 2006


, 30 May 2006
Rate this:
Please Sign up or sign in to vote.
A skinned ComboBox contains Web colors
Sample Image - emrcolorcombobox.png


Every Windows programmer and user knows color chooser controls and dialogs. Surely you see several types of them in several programs. One type of these controls could be a Color Combo Box. I need a color chooser combo box control in one of my projects, to easily select color. Because I couldn't find a suitable one; the best way was to create it myself.


EmrColorComboBox is a NET inherited DLL user control created with C#. It contains Web colors. Users can't add or remove any of the colors. But there is an item titled other to choose colors not listed in the dropped down list. There is a property to set control appearance to standard or skinned.


EmrColorComboBox is an inherited control and its source code; like every NET user control, contains properties, variables and events.

Properties; more than a standard combo box control are:

  • SelectedColor
  • ControlColor (The color of the control when the appearance is set to Skinned)
  • Appearance (Determines if the control displays skinned or standard.)

If you would like to ask more about the source, email me at

How To Use

To use the control, in the VS.NET environment, right click on tool box and select Add/Remove Items. In Customize Toolbox dialog, select .NET Framework Component and browse EmrColorComboBox. As you select Ok, the control will be added to the toolbox. Simply drag and drop it to your form.

The file you have downloaded contains two folders, one is the compiled EmrColorComboBox with its source code and the other is a demo project.

The demo project is a Windows form with a panel, two checkboxes, a picture box and an EmrColorComboBox.

One of the checkboxes is used to set Combo Box disabled or not and another determines if the control appeared skinned or not.

private void checkBox2_CheckedChanged(object sender, System.EventArgs e)
        this.colorComboBox1.Appearance = 
        this.colorComboBox1.Appearance = 

The PictureBox contains a color palette image. As you click picture box, the color of EmrColorComboBox will be changed to the selected color.

As you select a color in EmrColorComboBox panel back color will change to the selected color. If you select "other", standard color dialog box will appear and selecting more colors will be possible.

 private void colorComboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
    this.panel1.BackColor = this.colorComboBox1.SelectedColor;


  • 30th May, 2006: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Iran (Islamic Republic of) Iran (Islamic Republic of)
No Biography provided

You may also be interested in...

Comments and Discussions

Generaldoes not work in .Net 2.0 Pin
philipsslg1-Dec-06 22:25
memberphilipsslg1-Dec-06 22:25 
GeneralRe: does not work in .Net 2.0 Pin
Ampiroid18-Aug-08 7:44
memberAmpiroid18-Aug-08 7:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170813.1 | Last Updated 30 May 2006
Article Copyright 2006 by Ampiroid
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid