Spread for ASP.NET 9.0 Product Documentation
Compose(StyleInfo,Boolean) Method
Example 


Source StyleInfo object from which to get style settings
Whether to overwrite the current settings with the settings from the source object
Composes style settings using the current style settings and those of a specified object with an option to overwrite the current style settings.
Syntax
'Declaration
 
Public Overloads Overridable Sub Compose( _
   ByVal source As StyleInfo, _
   ByVal force As Boolean _
) 
'Usage
 
Dim instance As StyleInfo
Dim source As StyleInfo
Dim force As Boolean
 
instance.Compose(source, force)
public virtual void Compose( 
   StyleInfo source,
   bool force
)

Parameters

source
Source StyleInfo object from which to get style settings
force
Whether to overwrite the current settings with the settings from the source object
Remarks
Set force to true to overwrite the current settings.
Example
This example creates two StyleInfo objects and the second instance is composed from the first. The second instance is then assigned to the active sheet.
FarPoint.Web.Spread.StyleInfo info = new FarPoint.Web.Spread.StyleInfo();
FarPoint.Web.Spread.StyleInfo cinfo = new FarPoint.Web.Spread.StyleInfo();
FarPoint.Web.Spread.Border bord = new FarPoint.Web.Spread.Border(BorderStyle.Double, Color.Red, 3);
FarPoint.Web.Spread.Border bord1 = new FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Yellow, 3);
info.Border = bord;
info.CellType = new FarPoint.Web.Spread.LabelCellType();
cinfo.Border = bord1;
cinfo.CellType = new FarPoint.Web.Spread.ButtonCellType();
cinfo.Compose(info, true);
FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, cinfo); 
Dim info As New FarPoint.Web.Spread.StyleInfo()
Dim cinfo As New FarPoint.Web.Spread.StyleInfo()
Dim bord As New FarPoint.Web.Spread.Border(BorderStyle.Double, Color.Red, 3)
Dim bord1 As New FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Yellow, 3)
info.Border = bord
info.CellType = New FarPoint.Web.Spread.LabelCellType()
cinfo.Border = bord1
cinfo.CellType = New FarPoint.Web.Spread.ButtonCellType()
cinfo.Compose(info, True)
FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, cinfo) 
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

StyleInfo Class
StyleInfo Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.