I have an application that writes text with image asynchronously to the RixhTextBox. All works fine, except when i minimize window then restore it to check progress and all images after minimizing and before restoring are not floated to the next line. It looks like this:
Red line shows what happened while window was minimized. Code that inserts text:
txtLog.AppendText(" ");
txtLog.InsertImage(Resources.OK);
txtLog.AppendText(" " + message + Environment.NewLine);
Dont understand what difference between minimized\maximized writing to RTB and how to开发者_高级运维 resolve this.
ExRichTextBox.InsertImage states 'image is inserted wherever the caret is.' RichTextBox.AppendText doesn't, however.
Put debug logic to see if txtLog.SelectionStart is changing when minimized. If not - try forcing it
Edit: Good to hear it worked
精彩评论