Spread Windows Forms 8.0 Product Documentation
GetStyleInfo(Int32,Int32,StyleInfo) Method
Example 


Row index of specified cell
Column index of specified cell
StyleInfo object in which to return the style information
Gets the style information for a specified cell on this sheet using the specified StyleInfo object.
Syntax
'Declaration
 
Public Overloads Overridable Function GetStyleInfo( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal info As StyleInfo _
) As StyleInfo
'Usage
 
Dim instance As SheetView
Dim row As Integer
Dim column As Integer
Dim info As StyleInfo
Dim value As StyleInfo
 
value = instance.GetStyleInfo(row, column, info)
public virtual StyleInfo GetStyleInfo( 
   int row,
   int column,
   StyleInfo info
)

Parameters

row
Row index of specified cell
column
Column index of specified cell
info
StyleInfo object in which to return the style information

Return Value

StyleInfo object containing the composite style information for the cell
Remarks

If you use this overload and pass in a StyleInfo object, then the style is returned in that object. This method allows you to optimize object creations and reuse the same StyleInfo object for repeated calls to the method.

If you use the GetStyleInfo(Int32,Int32) method (which does not have the StyleInfo parameter) or use this overload with a null StyleInfo object, then a new StyleInfo is created and returned.

Example
This example illustrates the use of this member by returning the StyleInfo for the specified cell.
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo();
FarPoint.Win.Spread.StyleInfo si2;
si.BackColor = Color.LightBlue;
fpSpread1.ActiveSheet.SetStyleInfo(0, 0, si);
si2 = fpSpread1.ActiveSheet.GetStyleInfo(0, 0);
listBox1.Items.Add(si2.BackColor.ToString());
Dim si As New FarPoint.Win.Spread.StyleInfo()
Dim si2 As FarPoint.Win.Spread.StyleInfo
si.BackColor = Color.LightBlue
FpSpread1.ActiveSheet.SetStyleInfo(0, 0, si)
si2 = FpSpread1.ActiveSheet.GetStyleInfo(0, 0)
ListBox1.Items.Add(si2.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

Reference

SheetView Class
SheetView Members
Overload List
StyleInfo Class

 

 


Copyright © GrapeCity, inc. All rights reserved.