「複数行入力」「折り返し表示」「スクロールバー表示」などの機能を実装できますか?
対象製品
SPREAD for Windows Forms 8.0J
詳細
テキスト型セル(TextCellType)に属するメンバの設定により、以下のような機能を実現することができます。
◎複数行入力を可能とする(VB)
◎同(C#)
◎入力文字を常に大文字とする
◎同(C#)
◎入力文字数の制限
◎同(C#)
◎折り返し表示を行う
◎同(C#)
◎スクロールバー表示を行う ※編集モード時のみ表示されます
◎同(C#)
◎複数行入力を可能とする(VB)
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
FpSpread1.ActiveSheet.RowHeader.Rows(0).Height = 50
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.Multiline = True
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
FpSpread1.ActiveSheet.RowHeader.Rows(0).Height = 50
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.Multiline = True
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
◎同(C#)
private void Form1_Load(object sender, System.EventArgs e)
{
fpSpread1.ActiveSheet.RowHeader.Rows[0].Height = 50;
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.Multiline = true;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
{
fpSpread1.ActiveSheet.RowHeader.Rows[0].Height = 50;
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.Multiline = true;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
◎入力文字を常に大文字とする
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.CharacterCasing = CharacterCasing.Upper
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.CharacterCasing = CharacterCasing.Upper
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
◎同(C#)
private void Form1_Load(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.CharacterCasing = CharacterCasing.Upper;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
{
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.CharacterCasing = CharacterCasing.Upper;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
◎入力文字数の制限
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.MaxLength = 10
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.MaxLength = 10
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
◎同(C#)
private void Form1_Load(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.MaxLength= 10;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
{
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.MaxLength= 10;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
◎折り返し表示を行う
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
FpSpread1.ActiveSheet.RowHeader.Rows(0).Height = 50
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.WordWrap = True
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
FpSpread1.ActiveSheet.RowHeader.Rows(0).Height = 50
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.WordWrap = True
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
◎同(C#)
private void Form1_Load(object sender, System.EventArgs e)
{
fpSpread1.ActiveSheet.RowHeader.Rows[0].Height = 50;
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.WordWrap= true;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
{
fpSpread1.ActiveSheet.RowHeader.Rows[0].Height = 50;
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.WordWrap= true;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
◎スクロールバー表示を行う ※編集モード時のみ表示されます
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
FpSpread1.ActiveSheet.RowHeader.Rows(0).Height = 50
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.Multiline = True
t.ScrollBars = ScrollBars.Vertical
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
FpSpread1.ActiveSheet.RowHeader.Rows(0).Height = 50
Dim t As New FarPoint.Win.Spread.CellType.TextCellType
t.Multiline = True
t.ScrollBars = ScrollBars.Vertical
FpSpread1.ActiveSheet.Cells(0, 0).CellType = t
End Sub
◎同(C#)
private void Form1_Load(object sender, System.EventArgs e)
{
fpSpread1.ActiveSheet.RowHeader.Rows[0].Height = 50;
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.Multiline = true;
t.ScrollBars = ScrollBars.Vertical;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
{
fpSpread1.ActiveSheet.RowHeader.Rows[0].Height = 50;
FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
t.Multiline = true;
t.ScrollBars = ScrollBars.Vertical;
fpSpread1.ActiveSheet.Cells[0,0].CellType = t;
}
キーワード
セル型