ColorListBox

From Visual WebGui Wiki

Jump to: navigation, search


Contents

Overview

The ColorListBox is a special type of ListBox, for selecting colors instead of text.

For the most part, this control works much like a normal ListBox, but it is specially extended with the intention of being populated with items of type System.Drawing.Color, and will show the actual color of each of it's items, in addition to the name of the color in the list.

Availability

The ColorListBox is one of the Out of the Box standard controls, which means it is free and available in all Visual WebGui versions.

Relevant members

Properties

Name
Description
Items
The Items will contain the list of colors being selected from. You will use this collection if you are populating the ColorListBox manually with colors.
DataSource
Any list that implements IList or IListSource interfaces. ArrayList being one of the typical lists that can be assigned here.
SelectedItem
The currently selected item, of type System.Drawing.Color.
SelectedValue
The currently selected item, of type System.Drawing.Color if using a DataSource, nothing if no DataSource.
SelectedIndex
The sequential index of the currently selected item within it's source list (manual or DataSource)


Events

Name Description
SelectedIndexChanged

Fires whenever the item selection is changed.

Note, that for populating by using the DataSource property, this event will fire during the initial population.


Samples of use

See also


Personal tools