ListViewItem.ListViewSubItem.BackColor ListViewItem.ListViewSubItem.BackColor ListViewItem.ListViewSubItem.BackColor ListViewItem.ListViewSubItem.BackColor Property

定义

获取或设置该子项文本的背景色。Gets or sets the background color of the subitem's text.

public:
 property System::Drawing::Color BackColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };
public System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Public Property BackColor As Color

属性值

Color,表示该子项文本的背景色。A Color that represents the background color of the subitem's text.

注解

您可以使用BackColor属性更改子项文本后面显示的颜色。You can use the BackColor property to change the color displayed behind the subitem text. 如果要使用不同的ForeColor背景色和前景色组合 (使用属性设置前景色) 来区分一个子项, 则可以使用此属性。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 subitem from another. 例如, 可以将BackColor属性设置为Red , 以标识显示负值的子项。For example, you could set the BackColor property to Red to identify subitems that display a negative value.

如果拥有子项的的ListViewItem true属性设置为, 则设置此属性不起作用。 UseItemStyleForSubItemsIf the UseItemStyleForSubItems property of the ListViewItem that owns the subitem is set to true, setting this property has no effect.

适用于

另请参阅