问题
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