Spread ASP.NET 17
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / GeneralCellType Class / Size Property
Example


In This Topic
    Size Property (GeneralCellType)
    In This Topic
    Gets or sets the size of the text box in characters.
    Syntax
    'Declaration
     
    
    Public Property Size As Integer
    'Usage
     
    
    Dim instance As GeneralCellType
    Dim value As Integer
     
    instance.Size = value
     
    value = instance.Size
    public int Size {get; set;}

    Property Value

    Integer number of characters in the text box
    Remarks
    The value of this property must be greater than zero.
    Example
    This example creates a new GeneralCellType object, sets its Size and AllowWrap properties and then assigns the object to the first cell in the spreadsheet.
    FarPoint.Web.Spread.GeneralCellType icell=new FarPoint.Web.Spread.GeneralCellType();
    string Str;
    Str="This is a test for a GeneralCellType. Its size has been set to 20 and text should wrap to multiple lines.";
    icell.AllowWrap=True;
    icell.Size=90;
    FpSpread1.ActiveSheetView.Cells[0,0].CellType=icell;
    FpSpread1.ActiveSheetView.SetValue(0,0,Str);
    FpSpread1.Sheets[0].Columns[0].Width=120;
    FpSpread1.Sheets[0].Rows[0].Height=120;
    Dim icell As New FarPoint.Web.Spread.GeneralCellType()
    Dim Str As String
    Str="This is a test for a GeneralCellType. Its size has been set to 20 and text should wrap to multiple lines."
    icell.AllowWrap=True
    icell.Size=90
    FpSpread1.ActiveSheetView.Cells(0,0).CellType=icell
    FpSpread1.ActiveSheetView.SetValue(0,0,Str)
    FpSpread1.Sheets(0).Columns(0).Width=120
    FpSpread1.Sheets(0).Rows(0).Height=120
    See Also