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


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > BaseSheetStyleModel Class : GetCompositeInfo 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
Alternating row index of the cell, or -1 to skip composing any alternating style
Destination StyleInfo object for composing the styles; if null, then a new StyleInfo should be created and used
Gets the style information as a composite of settings for the specified cell, column, row, or model default.
Syntax
'Declaration
 
Public Overridable Function GetCompositeInfo( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal altIndex As Integer, _
   ByVal destInfo As StyleInfo _
) As StyleInfo
'Usage
 
Dim instance As BaseSheetStyleModel
Dim row As Integer
Dim column As Integer
Dim altIndex As Integer
Dim destInfo As StyleInfo
Dim value As StyleInfo
 
value = instance.GetCompositeInfo(row, column, altIndex, destInfo)
public virtual StyleInfo GetCompositeInfo( 
   int row,
   int column,
   int altIndex,
   StyleInfo destInfo
)

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
altIndex
Alternating row index of the cell, or -1 to skip composing any alternating style
destInfo
Destination StyleInfo object for composing the styles; if null, then a new StyleInfo should be created and used

Return Value

StyleInfo object containing the style (format) settings
Remarks

This implementation does nothing and returns null.

"Direct" in the style model means "not composite" or "not inherited." GetDirectInfo returns the style properties that have been set for the specified cell, column, or row directly and does not return any settings that are set for higher levels (like the entire model), while this method, GetCompositeInfo, returns the style properties "composed" or "merged" into one StyleInfo object that contains all the settings to paint and edit the cell, column, or row, including inherited settings. The viewport controls use the composite style to render each cell.

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 illustrates the use of this member by returning the composite information for the cell.
FarPoint.Win.Spread.Model.BaseSheetStyleModel styleModel;
FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
styleModel = (FarPoint.Win.Spread.Model.BaseSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
styleModel.GetCompositeInfo(0, 0, 1, sInfo);
Dim styleModel As FarPoint.Win.Spread.Model.BaseSheetStyleModel
Dim sInfo As New FarPoint.Win.Spread.StyleInfo()
styleModel = fpSpread1.ActiveSheet.Models.Style
styleModel.GetCompositeInfo(0, 0, 1, sInfo)
See Also

Reference

BaseSheetStyleModel Class
BaseSheetStyleModel Members