Spread for ASP.NET 9.0 Product Documentation
AllowWrap Property (TextCellType)
Example 


Gets or sets whether the cell allows text to wrap to multiple lines. Wrapping only occurs on word breaks.
Syntax
'Declaration
 
Public Overridable Property AllowWrap As Boolean
'Usage
 
Dim instance As TextCellType
Dim value As Boolean
 
instance.AllowWrap = value
 
value = instance.AllowWrap
public virtual bool AllowWrap {get; set;}

Property Value

true to allow wrapping to multiple lines; false otherwise
Remarks

When this property is set to true, text is wrapped when it is wider that the width of the cell. When this property is set to false, text that is wider than the cell is not displayed in the cell.

Wrapping only occurs on word breaks.

Example
This example creates a new TextCellType object, sets its Size and AllowWrap properties and then assigns the object to the first cell in the spreadsheet.
Dim tcell As New FarPoint.Web.Spread.TextCellType()
Dim Str As String
Str="This is a test for a TextCellType. Its size has been set to 20 and text should wrap to multiple lines."
tcell.AllowWrap=True
tcell.Size=90
FpSpread1.ActiveSheetView.Cells(0,0).CellType=tcell
FpSpread1.ActiveSheetView.SetValue(0,0,Str)
FpSpread1.Sheets(0).Columns(0).Width=120
FpSpread1.Sheets(0).Rows(0).Height=120
FarPoint.Web.Spread.TextCellType tcell=new FarPoint.Web.Spread.TextCellType();
string Str;
Str="This is a test for a TextCellType. The size has been set to 20 and text should wrap to multiple lines.";
tcell.AllowWrap=True;
tcell.Size=90;
FpSpread1.ActiveSheetView.Cells[0,0].CellType=tcell;
FpSpread1.ActiveSheetView.SetValue(0,0,Str);
FpSpread1.Sheets[0].Columns[0].Width=120;
FpSpread1.Sheets[0].Rows[0].Height=120;
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

TextCellType Class
TextCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.