Spread ASP.NET 16
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / Inset Class / Inset Constructor / Inset Constructor(Int32,Int32,Int32,Int32)
Left inset (margin)
Top inset (margin)
Right inset (margin)
Bottom inset (margin)
Example


In This Topic
    Inset Constructor(Int32,Int32,Int32,Int32)
    In This Topic
    Creates a set of margins (Inset object) with the specified values.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal left As Integer, _
       ByVal top As Integer, _
       ByVal right As Integer, _
       ByVal bottom As Integer _
    )
    'Usage
     
    Dim left As Integer
    Dim top As Integer
    Dim right As Integer
    Dim bottom As Integer
     
    Dim instance As New Inset(left, top, right, bottom)
    public Inset( 
       int left,
       int top,
       int right,
       int bottom
    )

    Parameters

    left
    Left inset (margin)
    top
    Top inset (margin)
    right
    Right inset (margin)
    bottom
    Bottom inset (margin)
    Remarks
    This method initializes an instance of the Inset class with the specified values of insets (margins).
    Example
    This example creates three alternating rows, adjusts the height of the rows and sets up an Inset, which allows the text in the cell to be indented to the specified margin.
    FarPoint.Web.Spread.Inset inset=new FarPoint.Web.Spread.Inset(35,5,5,35);
    FpSpread1.Sheets[0].AlternatingRows.Count=3;
    FpSpread1.Sheets[0].Rows[0].Height=80;
    FpSpread1.Sheets[0].Rows[1].Height=80;
    FpSpread1.Sheets[0].Rows[2].Height=80;
    FpSpread1.Sheets[0].SetValue(0,0,"Test");
    FpSpread1.Sheets[0].SetValue(1,0,"For");
    FpSpread1.Sheets[0].SetValue(2,0,"Margin");
    FpSpread1.Sheets[0].AlternatingRows[0].Margin=inset;
    FpSpread1.Sheets[0].AlternatingRows[1].Margin=inset;
    FpSpread1.Sheets[0].AlternatingRows[2].Margin=inset;
    Dim inset As New FarPoint.Web.Spread.Inset(35,5,5,35)
    FpSpread1.Sheets(0).AlternatingRows.Count=3
    FpSpread1.Sheets(0).Rows(0).Height=80
    FpSpread1.Sheets(0).Rows(1).Height=80
    FpSpread1.Sheets(0).Rows(2).Height=80
    FpSpread1.Sheets(0).SetValue(0,0,"Test")
    FpSpread1.Sheets(0).SetValue(1,0,"For")
    FpSpread1.Sheets(0).SetValue(2,0,"Margin")
    FpSpread1.Sheets(0).AlternatingRows(0).Margin=inset
    FpSpread1.Sheets(0).AlternatingRows(1).Margin=inset
    FpSpread1.Sheets(0).AlternatingRows(2).Margin=inset
    See Also