L
Ludwig
Goal: text that is pasted in a RichTextBox control has to be formatted
(keywords should get another forecolor/style).
My first attempt to format the text was the traditional approach of
setting SelectionStart and SelectionLength, and then setting the
SelectionColor/SelectionFont.
This works fine for small updates, but when large amount of text is
pasted it takes seconds to format the whole text; sometimes it just
hangs. This is unacceptable.
Does anyone have any insight on how this can be done without the
performance problems?
Thanks!
(keywords should get another forecolor/style).
My first attempt to format the text was the traditional approach of
setting SelectionStart and SelectionLength, and then setting the
SelectionColor/SelectionFont.
This works fine for small updates, but when large amount of text is
pasted it takes seconds to format the whole text; sometimes it just
hangs. This is unacceptable.
Does anyone have any insight on how this can be done without the
performance problems?
Thanks!