我已将Multiline
属性更改为true
,将WordWrap
更改为false
,但它无效。
显示该表的代码是:
for (int i = -1; i < membershipmat.Rows.Count; i++)
{
rtf.Append(@"{\trowd");
ColumnPosition = ColWidth;
for (int j = 0; j < membershipmat.Columns.Count; j++)
{
rtf.Append(@"\clwWidth" + ColWidth.ToString() + @"\cellx" + ColumnPosition.ToString());
ColumnPosition += ColWidth;
}
rtf.Append("{");
for (int j = 0; j < membershipmat.Columns.Count; j++)
{
if (i == -1)
rtf.Append(@"{\fs24\f3\b\intbl {\ltrch Cluster " + (j + 1).ToString() + @"}\li0\ri0\sa0\sb0\fi0\ql\sl15\slmult0\cell}");
else
rtf.Append(@"{\fs22\f3\b0\intbl {\ltrch " + membershipmat.Rows[i].ItemArray[j].ToString() + @"}\li0\ri0\sa0\sb0\fi0\ql\sl15\slmult0\cell}");
}
rtf.Append("}");
rtf.Append(@"{\trowd");
rtf.Append(@"\row}}");
}
结果如下: