我richtextbox
这样创建的表:如何在richtextbox中创建的表中添加文本?
//Since too much string appending go for string builder
StringBuilder tableRtf = new StringBuilder();
//beginning of rich text format,dont customize this begining line
tableRtf.Append(@"{\rtf1 ");
//create 5 rows with 3 cells each
for (int i = 0; i < 5; i++)
{
tableRtf.Append(@"\trowd");
//A cell with width 1000.
tableRtf.Append(@"\cellx1000");
//Another cell with width 2000.end point is 3000 (which is 1000+2000).
tableRtf.Append(@"\cellx2000");
//Another cell with width 1000.end point is 4000 (which is 3000+1000)
tableRtf.Append(@"\cellx3000");
//Another cell with width 1000.end point is 4000 (which is 3000+1000)
tableRtf.Append(@"\cellx4000");
tableRtf.Append(@"\intbl \cell \row"); //create row
}
tableRtf.Append(@"\pard");
tableRtf.Append(@"}");
this.misc_tb.Rtf = tableRtf.ToString();
现在我想知道我怎么可以把文字,标题和每个细胞。
你有什么想法吗?
你能告诉我怎么做,与PL的indexOf缓解? –