System.Windows.Forms.ColumnHeader Class

Displays a single column header in a System.Windows.Forms.ListView control.

See Also: ColumnHeader Members

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ColumnHeaderConverter))]
[System.ComponentModel.ToolboxItem(false)]
[System.ComponentModel.DesignTimeVisible(false)]
[System.ComponentModel.DefaultProperty("Text")]
public class ColumnHeader : System.ComponentModel.Component, ICloneable

Remarks

A column header is an item in a System.Windows.Forms.ListView control that contains heading text. System.Windows.Forms.ColumnHeader objects can be added to a System.Windows.Forms.ListView using the System.Windows.Forms.ListView.ColumnHeaderCollection.Add(string, int, HorizontalAlignment) method of the System.Windows.Forms.ListView.ColumnHeaderCollection class. To add a group of columns to a System.Windows.Forms.ListView, you can use the System.Windows.Forms.ListView.ColumnHeaderCollection.AddRange(ColumnHeader[]) method of the System.Windows.Forms.ListView.ColumnHeaderCollection class. You can use the ColumnHeader.Index property of the System.Windows.Forms.ColumnHeader class to determine where the System.Windows.Forms.ColumnHeader is located in the System.Windows.Forms.ListView.ColumnHeaderCollection.

System.Windows.Forms.ColumnHeader provides the ColumnHeader.Text and ColumnHeader.TextAlign properties to set the text displayed in the control and the alignment of the text in the column header. To determine whether a System.Windows.Forms.ColumnHeader is associated with a System.Windows.Forms.ListView control, you can reference the ColumnHeader.ListView property. If you want to copy a System.Windows.Forms.ColumnHeader for use in another System.Windows.Forms.ListView control, you can use the ColumnHeader.Clone method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0