This documentation is archived and is not being maintained.

ListViewItem.BackColor Property

Gets or sets the background color of the item's text.

[Visual Basic]
Public Property BackColor As Color
[C#]
public Color BackColor {get; set;}
[C++]
public: __property Color get_BackColor();
public: __property void set_BackColor(Color);
[JScript]
public function get BackColor() : Color;
public function set BackColor(Color);

Property Value

A Color that represents the background color of the item's text.

Remarks

You can use the BackColor property to change the color displayed behind the item text. This property can be used if you want to use different background and foreground color combinations (using the ForeColor property to set the foreground color) to differentiate one item from another. For example, you could set the BackColor property to Color.Red to identify items that have failed validation or are missing subitem information.

If you want to use the same background color for all subitems of an item, set the UseItemStyleForSubItems property to true. This will cause the colors and fonts specified for the item to be used for all subitem text.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ListViewItem Class | ListViewItem Members | System.Windows.Forms Namespace | Color | ForeColor

Show: