web analytics

Displaying All Known Colours in a ComboBox

Options

codeling 1599 - 6654
@2016-01-06 19:02:22

The following C# code shows how to display all known colors in a ComboBox

//Get System's Known Colours
foreach (string colourName in  System.Enum.GetNames(typeof(System.Drawing.KnownColor)))
{
   //Add Known Colours
   colorComboBox.Items.Add(colourName));
}

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com