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


row
Model row index of the cell, or -1 to specify a column or model default
column
Model column index of the cell, or -1 to specify a row or model default
altIndex
Alternating row index of the cell, or -1 to skip composing any alternating style
destInfo
Specifies a StyleInfo object to use for composing the styles

Glossary Item Box

Gets the composite style for the specified cell, column, row, or model default.

Syntax

Visual Basic (Declaration) 
Public Overrides 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 DefaultSheetStyleModel
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# 
public override StyleInfo GetCompositeInfo( 
   int row,
   int column,
   int altIndex,
   StyleInfo destInfo
)

Parameters

row
Model row index of the cell, or -1 to specify a column or model default
column
Model column index of the cell, or -1 to specify a row or model default
altIndex
Alternating row index of the cell, or -1 to skip composing any alternating style
destInfo
Specifies a StyleInfo object to use for composing the styles

Return Value

StyleInfo object containing the style (format) settings

Exceptions

ExceptionDescription
System.IndexOutOfRangeException Specified row index is not valid; must be between -1 and the total number of rows
System.IndexOutOfRangeException Specified column index is not valid; must be between -1 and the total number of columns
System.IndexOutOfRangeException Specified index is not valid; must be between 0 and the total number of styles

Remarks

The component 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.

If destInfo is null, then a new StyleInfo is created and used.

This method does not return information for conditional formats; for conditional format information, refer to the GetConditionalFormats method.

Example

This example illustrates the use of this member by returning the composite information for the first cell.
C#Copy Code
FarPoint.Win.Spread.Model.DefaultSheetStyleModel defstyleModel = new FarPoint.Win.Spread.Model.DefaultSheetStyleModel();
FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
FarPoint.Win.Spread.StyleInfo composite = new FarPoint.Win.Spread.StyleInfo();
defstyleModel = (FarPoint.Win.Spread.Model.DefaultSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
sInfo.BackColor = Color.LightBlue;
defstyleModel.SetDirectInfo(0, 0, sInfo);
composite = defstyleModel.GetCompositeInfo(0, 0, 0, sInfo);
listBox1.Items.Add(composite.BackColor.ToString());
Visual BasicCopy Code
Dim defstyleModel As New FarPoint.Win.Spread.Model.DefaultSheetStyleModel()
Dim sInfo As New FarPoint.Win.Spread.StyleInfo()
Dim composite As New FarPoint.Win.Spread.StyleInfo()
defstyleModel = FpSpread1.ActiveSheet.Models.Style
sInfo.BackColor = Color.LightBlue
defstyleModel.SetDirectInfo(0, 0, sInfo)
composite = defstyleModel.GetCompositeInfo(0, 0, 0, sInfo)
ListBox1.Items.Add(composite.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.