ColorListBox CodeSample - Populating the Items collection

From Visual WebGui Wiki

Jump to: navigation, search


Overview

An example on how to manually populate the Items collection of a ColorListBox.

VB.NET Code

Me.ColorListBox1.Items.Add(System.Drawing.Color.AliceBlue)
Me.ColorListBox1.Items.Add(System.Drawing.Color.Aqua)

C# Code

this.ColorListBox1.Items.Add(System.Drawing.Color.AliceBlue);
this.ColorListBox1.Items.Add(System.Drawing.Color.Aqua);
Personal tools