次のサンプルコードは、セルの幅が調整されたときにセル内のテキストを強制的に改行します。
FarPoint.Win.Spread.CellType.RichTextCellType rtb;
private void Form1Load(object sender, System.EventArgs e)
{
rtb = new FarPoint.Win.Spread.CellType.RichTextCellType();
fpSpread1.ActiveSheet.Cells[0, 0].CellType = rtb;
System.IO.StreamReader file = new System.IO.StreamReader(Application.StartupPath + "\\test.rtf");
string words = file.ReadToEnd();
fpSpread1.ActiveSheet.Cells[0, 0].Value = words;
rtb.Multiline = true;
rtb.WordWrap = true;
}
Dim rtb As New FarPoint.Win.Spread.CellType.RichTextCellType
Private Sub Form1Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim file As New System.IO.StreamReader(Application.StartupPath & "\test1.rtf")
Dim words As String = file.ReadToEnd()
rtb.ScrollBars = RichTextBoxScrollBars.ForcedVertical
FpSpread1.ActiveSheet.Cells(0, 0).Value = words
rtb.Multiline = True
rtb.WordWrap = True
End Sub