Spread Windows Forms 12.0 Product Documentation
AutoTextIndex Property (RowHeader)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > RowHeader Class : AutoTextIndex Property
Gets or sets which row header column displays the automatic text when there are multiple row header columns.
Syntax
'Declaration
 
Public Property AutoTextIndex As Integer
'Usage
 
Dim instance As RowHeader
Dim value As Integer
 
instance.AutoTextIndex = value
 
value = instance.AutoTextIndex
public int AutoTextIndex {get; set;}

Property Value

Integer column index in the header
Remarks

If your header has multiple row header columns,you can specify which header column displays the automatic text by setting this property. To specify the index, set the property to a value between 0 and n-1, where 0 is the left-most column and n is the number of header columns. Any value above n-1 simply puts the automatic text in the right-most column.

The automatic text is the text automatically assigned to header cells by Spread. By default, for rows the automatic text is numbers. Use the AutoText property to change the automatic text to blank or to letters. Use the AutoText property to specify what automatic text, if any, is displayed in the row headers. If you set the AutoText property to Blank, the row header column specified by the AutoTextIndex property is blank. Use the ColumnCount property to specify how many row header columns the component displays. Use the ColumnHeader.AutoTextIndex property to specify which column header row displays the automatic text.

If you set this property to specify a column to display the automatic text, for example, header column 3, and then later change the number of row header columns to be less than 3, the label is displayed in the rightmost column, as if the ColumnCount property is set to -1. However, if you then change the number of row header columns to 3 or greater, the label is again displayed in header column 3.

This property does not have an effect unless the Visible property (or the SheetView.RowHeaderVisible property) is set to true and the row header columns are not hidden.

For more information about automatic text, see Customizing the Default Header Labels.

Example
This example specifies that letters be displayed in the third row header.
Dim r As FarPoint.Win.Spread.RowHeader
r = FpSpread1.ActiveSheet.RowHeader
r.ColumnCount = 4
r.AutoText = FarPoint.Win.Spread.HeaderAutoText.Letters
r.AutoTextIndex = 2
FarPoint.Win.Spread.RowHeader r;
r = fpSpread1.ActiveSheet.RowHeader;
r.ColumnCount = 4; 
r.AutoText = FarPoint.Win.Spread.HeaderAutoText.Letters;
r.AutoTextIndex = 2;
See Also

Reference

RowHeader Class
RowHeader Members
AutoText Property

User-Task Documentation

Customizing the Default Header Labels