Spread Windows Forms 7.0 Product Documentation
GetCompositeInfo Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > ISheetStyleModel Interface : GetCompositeInfo Method


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 in the model, or -1 to skip composing any alternating style
destInfo
Style set (StyleInfo object) to use for composing the styles; if destInfo is null then a new StyleInfo is created and used

Glossary Item Box

Gets the style information for a cell, column, row, or model as a composite of settings.

Syntax

Visual Basic (Declaration) 
Function GetCompositeInfo( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal altIndex As Integer, _
   ByVal destInfo As StyleInfo _
) As StyleInfo
Visual Basic (Usage)Copy Code
Dim instance As ISheetStyleModel
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)
C# 
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 in the model, or -1 to skip composing any alternating style
destInfo
Style set (StyleInfo object) to use for composing the styles; if destInfo is null then a new StyleInfo is created and used

Return Value

StyleInfo object containing the style information

Remarks

The control uses the composite style to render each cell.

"Composite" means the composition of the inherited or merged styles. "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 ar 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.

GetDirectAltRowInfo returns the alternating row style for the specified alternating index.

This method does not return information for conditional formats.

Example

This example returns the composite information for the cell.
C#Copy Code
FarPoint.Win.Spread.Model.ISheetStyleModel ssm;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData");
FarPoint.Win.Spread.StyleInfo si;
ssm = (FarPoint.Win.Spread.Model.ISheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
ns.BackColor = Color.LightBlue;
fpSpread1.NamedStyles.Add(ns);
ssm.SetDirectAltRowInfo(0, ns);
si = ssm.GetCompositeInfo(0, 0, 0, null);
label1.Text = si.BackColor.ToString();
Visual BasicCopy Code
Dim ssm As FarPoint.Win.Spread.Model.ISheetStyleModel
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData")
Dim si As FarPoint.Win.Spread.StyleInfo
ssm = FpSpread1.ActiveSheet.Models.Style
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
ssm.SetDirectAltRowInfo(0, ns)
si = ssm.GetCompositeInfo(0, 0, 0, Nothing)
Label1.Text = si.BackColor.ToString()

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.