Merging two rtf fields showed in bad style

我只是一个虾纸丫 提交于 2019-12-24 09:26:58

问题


In my application episode of each book saved in SQLite database as rtf format. I merging episode by this code:

rtbText.ResetText();
rtbText.Clear();
rtbText.Rtf = null;
DataTable dt = DAL.DataAccessClass.MultiMedia.FetchTexts(PointId, OutPointTitleId);
if (dt.Rows.Count != 0)
{
    string TextForRtf = string.Empty;
    RichTextBox rtftxt = new RichTextBox();
    foreach (DataRow Row in dt.Rows)
    {
        string Temp = Row["PointTitleContentRTF"].ToString();
        TextForRtf += Temp.Replace("\n}", "\n").Trim();
    }
    rtbText.Rtf = TextForRtf;
    rtbText.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
    rtbText.Modified = false;
}

List of episodes are in the list box. when user click on book name, all episodes must be merging and show in RichTextBox. but at the first time content of RichTextBox show in the middle of RichTextBox. when click on any episode an again click on the book name RichTextBox scontents show correctly. How can i fix this?

This is an illustration of my problem:

来源:https://stackoverflow.com/questions/12277012/merging-two-rtf-fields-showed-in-bad-style

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!