开发者

Images issue in WinForms RichTextBox

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:

Images issue in WinForms RichTextBox

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜