Spread ASP.NET 17
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / Border Class / Clone Method
Example


In This Topic
    Clone Method (Border)
    In This Topic
    Creates a new border that is a copy of the current instance.
    Syntax
    'Declaration
     
    
    Public Overridable Function Clone() As Object
    'Usage
     
    
    Dim instance As Border
    Dim value As Object
     
    value = instance.Clone()
    public virtual object Clone()

    Return Value

    Object containing a copy of the object
    Example
    This example creates two Border objects and clones the first object's settings to the second's and applies those settings to an instance of a Cell object.
    FarPoint.Web.Spread.Border border=new FarPoint.Web.Spread.Border(BorderStyle.Dotted,Color.Red,2);
    FarPoint.Web.Spread.Bordercloneborder=new FarPoint.Web.Spread.Border();
    FarPoint.Web.Spread.Cell acell;
    acell=FpSpread1.Cells[0,0];
    cloneborder=border.Clone();
    acell.Border=cloneborder;
    Dim border As New FarPoint.Web.Spread.Border(BorderStyle.Dotted,Color.Red,2)
    Dim cloneborder As New FarPoint.Web.Spread.Border()
    Dim acell As FarPoint.Web.Spread.Cell
    acell=FpSpread1.Cells(0,0)
    cloneborder=border.Clone()
    acell.Border=cloneborder
    See Also