RichTextBox水平滚动条在显示表时不显示

时间:2015-05-21 16:42:17

标签: c# richtextbox rtf

我已将Multiline属性更改为true,将WordWrap更改为false,但它无效。

enter image description here

显示该表的代码是:

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}}");
            }

结果如下:

enter image description here

0 个答案:

没有答案