ColumnHeader(s) |
Description
The ColumnHeaders collection contains one or more ColumnHeader objects |
Columnheaders Collection Properties and Methods
Property |
Description |
|
Count |
(read-only) The total number of ColumnHeaders in the collection |
|
Item (Index) |
Returns a specific member of the collection (either by position or by key). |
|
Method |
Description |
|
Add |
Parameters: [Index], [Key], [Text], [Width], [Alignment], [Icon] |
|
Adds a ColumnHeader to a ColumnHeaders collection in a ListView control |
||
Index |
(optional) An integer specifying the position where you want to insert the ColumnHeader. If not specified, the ColumnHeader is added to the end of the ColumnHeaders collection. |
|
Key |
(optional) A unique string that identifies the ColumnHeader, Use this value to retrieve a specific ColumnHeader. An error occurs if the key is not unique. |
|
Text |
(optional) A string that appears in the ColumnHeader |
|
Width |
(optional) A numeric expression specifying the width of the object using the scale units of the control's container |
|
Alignment |
(optional). An integer that determines the alignment of text in the ColumnHeader. See the Alignment property above. |
|
Icon |
(optional). The key or index property of a ListImage object. The ColumnHeaderIcons property of the ListView must be set to the ImageList control containing the ListImage object(s). |
|
Clear |
Removes all ColumnHeaders in the collection |
|
Remove |
Parameters: Index |
|
Removes a specific ColumnHeader. Index is an integer or string that uniquely identifies the ColumnHeader. Use an integer to specify the value of the Index property; use a string to specify the value of the Key property. |
Individual Columnheader Properties
Property |
Description |
|
Alignment |
0 |
Text in the ColumnHeader is left-aligned (default) |
1 |
Text in the ColumnHeader is right-aligned |
|
2 |
Text in the ColumnHeader is centered |
|
The first column in a ListView control must be left-aligned ! |
||
Icon |
Returns or sets an icon to be displayed in the ColumnHeader. The Icon property can be set to the Key or Index property of a ListImage object. |
|
Index |
(read-only) An integer that uniquely identifies a ColumnHeader in the collection. The index is set by default to the order of the creation of objects in a collection. The index for the first object in a collection will always be 1 |
|
Key |
A string that uniquely identifies a ColumnHeader in the collection |
|
Left |
(read-only) The distance from the left edge of the ListView control |
|
Position |
Returns or sets the position of a ColumnHeader object. The integer can be any number from 1 to n, where n is the number of ColumnHeaders. |
|
SubItemIndex |
(read-only) The index of the subitem associated with a ColumnHeader. |
|
Text |
Returns or sets the text to be displayed in the ColumnHeader |