テキストの折り返し(ワードラップ)を有効にするには?
対象製品
MultiRow for Windows Forms 5.0J
詳細
組み込みのセル型(TextBoxCell や ColumnHeaderCell)の場合、CellStyle.Multiline プロパティと CellStyle.WordWrap プロパティをそれぞれ MultiRowTriState.True に設定します。
[Visual Basic]
[C#]
InputManCell (GcTextBoxCell)の場合、CellStyle.Multiline プロパティを MultiRowTriState.True に設定し、GcTextBoxCell.WrapMode プロパティを WordWrap または CharWrap に設定します。
InputManCell では、CellStyle.WordWrap プロパティは使用されません。
[Visual Basic]
Imports GrapeCity.Win.MultiRow
Dim template As Template = New Template()
Dim columnHeaderSection1 As ColumnHeaderSection = New ColumnHeaderSection()
Dim columnHeaderCell1 As ColumnHeaderCell = New ColumnHeaderCell()
Dim textBoxCell1 As TextBoxCell = New TextBoxCell()
textBoxCell1.Style.Multiline = MultiRowTriState.True
textBoxCell1.Style.WordWrap = MultiRowTriState.True
textBoxCell1.Value = "Hello World"
textBoxCell1.Size = New Size(40, 40)
template.Width = textBoxCell1.Size.Width
template.Row.Cells.Add(textBoxCell1)
template.Row.Height = textBoxCell1.Size.Height
columnHeaderSection1.Cells.Add(columnHeaderCell1)
columnHeaderSection1.Height = columnHeaderCell1.Size.Height
template.ColumnHeaders.Add(columnHeaderSection1)
GcMultiRow1.Template = template
GcMultiRow1.RowCount = 10
Dim template As Template = New Template()
Dim columnHeaderSection1 As ColumnHeaderSection = New ColumnHeaderSection()
Dim columnHeaderCell1 As ColumnHeaderCell = New ColumnHeaderCell()
Dim textBoxCell1 As TextBoxCell = New TextBoxCell()
textBoxCell1.Style.Multiline = MultiRowTriState.True
textBoxCell1.Style.WordWrap = MultiRowTriState.True
textBoxCell1.Value = "Hello World"
textBoxCell1.Size = New Size(40, 40)
template.Width = textBoxCell1.Size.Width
template.Row.Cells.Add(textBoxCell1)
template.Row.Height = textBoxCell1.Size.Height
columnHeaderSection1.Cells.Add(columnHeaderCell1)
columnHeaderSection1.Height = columnHeaderCell1.Size.Height
template.ColumnHeaders.Add(columnHeaderSection1)
GcMultiRow1.Template = template
GcMultiRow1.RowCount = 10
[C#]
using GrapeCity.Win.MultiRow;
Template template = new Template();
ColumnHeaderSection columnHeaderSection1 = new ColumnHeaderSection();
ColumnHeaderCell columnHeaderCell1 = new ColumnHeaderCell();
TextBoxCell textBoxCell1 = new TextBoxCell();
textBoxCell1.Style.Multiline = MultiRowTriState.True;
textBoxCell1.Style.WordWrap = MultiRowTriState.True;
textBoxCell1.Value = "Hello World";
textBoxCell1.Size = new Size(40, 40);
template.Width = textBoxCell1.Size.Width;
template.Row.Cells.Add(textBoxCell1);
template.Row.Height = textBoxCell1.Size.Height;
columnHeaderSection1.Cells.Add(columnHeaderCell1);
columnHeaderSection1.Height = columnHeaderCell1.Size.Height;
template.ColumnHeaders.Add(columnHeaderSection1);
gcMultiRow1.Template = template;
gcMultiRow1.RowCount = 10;
Template template = new Template();
ColumnHeaderSection columnHeaderSection1 = new ColumnHeaderSection();
ColumnHeaderCell columnHeaderCell1 = new ColumnHeaderCell();
TextBoxCell textBoxCell1 = new TextBoxCell();
textBoxCell1.Style.Multiline = MultiRowTriState.True;
textBoxCell1.Style.WordWrap = MultiRowTriState.True;
textBoxCell1.Value = "Hello World";
textBoxCell1.Size = new Size(40, 40);
template.Width = textBoxCell1.Size.Width;
template.Row.Cells.Add(textBoxCell1);
template.Row.Height = textBoxCell1.Size.Height;
columnHeaderSection1.Cells.Add(columnHeaderCell1);
columnHeaderSection1.Height = columnHeaderCell1.Size.Height;
template.ColumnHeaders.Add(columnHeaderSection1);
gcMultiRow1.Template = template;
gcMultiRow1.RowCount = 10;
InputManCell (GcTextBoxCell)の場合、CellStyle.Multiline プロパティを MultiRowTriState.True に設定し、GcTextBoxCell.WrapMode プロパティを WordWrap または CharWrap に設定します。
InputManCell では、CellStyle.WordWrap プロパティは使用されません。
関連情報
この文書は、以前は次のFAQ IDで公開されていました : 11695