Spread for ASP.NET 7.0 Product Documentation
CopyFrom Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > StyleInfo Class : CopyFrom Method


obj
StyleInfo object from which to copy style settings

Glossary Item Box

Copies the specified style settings of the specified object to the current object.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub CopyFrom( _
   ByVal obj As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As StyleInfo
Dim obj As Object
 
instance.CopyFrom(obj)
C# 
public virtual void CopyFrom( 
   object obj
)

Parameters

obj
StyleInfo object from which to copy style settings

Example

This example creates two StyleInfo objects and the second instance is copied from the first. The second instance is then assigned to the active sheet.
C#Copy Code
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.CopyFrom(info);
FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, cinfo); 
Visual BasicCopy Code
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.CopyFrom(info)
FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, cinfo) 

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

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