Spread Windows Forms 11.0 Product Documentation
SetDirectInfo Method (BaseSheetStyleModel)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > BaseSheetStyleModel Class : SetDirectInfo Method
Row index of the cell in the model, or -1 to specify an entire column or the model default
Column index of the cell in the model, or -1 to specify an entire row or the model default
Source StyleInfo object that has style information
Sets the direct style information for the specified cell, column, row, or model default.
Syntax
'Declaration
 
Public Overridable Sub SetDirectInfo( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal info As StyleInfo _
) 
'Usage
 
Dim instance As BaseSheetStyleModel
Dim row As Integer
Dim column As Integer
Dim info As StyleInfo
 
instance.SetDirectInfo(row, column, info)
public virtual void SetDirectInfo( 
   int row,
   int column,
   StyleInfo info
)

Parameters

row
Row index of the cell in the model, or -1 to specify an entire column or the model default
column
Column index of the cell in the model, or -1 to specify an entire row or the model default
info
Source StyleInfo object that has style information
Remarks

This implementation does nothing.

"Direct" in the style model means "not composite" or "not inherited." This method, SetDirectInfo, sets the style properties for the specified cell, column, or row directly. SetDirectAltRowInfo sets the alternating row style information.

In terms of precedence of styles, direct cell styles override direct row styles, which override direct column styles, which override model default styles.

In terms of allowed values, for a direct row style, use -1 for the entire column; for a direct column style, use -1 for the entire row; and for a model default style, use -1 for all the rows and columns.

Example
This example sets the style for the specified cell.
FarPoint.Win.Spread.Model.BaseSheetStyleModel styleModel;
FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
sInfo.BackColor = Color.Red;
styleModel = (FarPoint.Win.Spread.Model.BaseSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
styleModel.SetDirectInfo(0, 0, sInfo);
Dim styleModel As FarPoint.Win.Spread.Model.BaseSheetStyleModel
Dim sInfo As New FarPoint.Win.Spread.StyleInfo()
sInfo.BackColor = Color.Red
styleModel = fpSpread1.ActiveSheet.Models.Style
styleModel.SetDirectInfo(0, 0, sInfo)
See Also

Reference

BaseSheetStyleModel Class
BaseSheetStyleModel Members