Spread ASP.NET 6.0 Product Documentation
CopyFrom Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > NamedStyle Class : CopyFrom Method


obj
Specifies the StyleInfo or NamedStyle object from which to copy

Glossary Item Box

Copies the properties of the specified object to the current object.

Syntax

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

Parameters

obj
Specifies the StyleInfo or NamedStyle object from which to copy

Example

This example copies a StyleInfo object into a NamedStyle object and uses it to set the background color of the headers.
C#Copy Code
FarPoint.Web.Spread.StyleInfo si = new FarPoint.Web.Spread.StyleInfo();
si.BackColor = Color.Yellow;
si.Font.Bold = true;
FarPoint.Web.Spread.NamedStyle parent = new FarPoint.Web.Spread.NamedStyle("StyleHeaders", "HeadersDefault");
parent.CopyFrom(si);
FpSpread1.NamedStyles.Add(parent);
FpSpread1.ActiveSheetView.ColumnHeader.DefaultStyle = parent;
FpSpread1.ActiveSheetView.RowHeader.DefaultStyle = parent;
Visual BasicCopy Code
Dim si As New FarPoint.Web.Spread.StyleInfo()
si.BackColor = Color.Yellow
si.Font.Bold = True
Dim parent As New FarPoint.Web.Spread.NamedStyle("StyleHeaders", "HeaderDefault")
parent.CopyFrom(si)
FpSpread1.NamedStyles.Add(parent)
FpSpread1.ActiveSheetView.ColumnHeader.DefaultStyle = parent
FpSpread1.ActiveSheetView.RowHeader.DefaultStyle = parent

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.