I'm trying to color parts of the text based on labels. I wrote a function that cycles through and does it just fine yet it requires selection which jumps the box around quite frankly it's ugly.
Is there a way to create styled text, concatenate it, and inject it into the RichTextBox?
RichTextBox
can be a little weird so you'll need to test this to see, but in general the approach to stopping this is:This instructs ensures that the control won't be redrawn until you've finished changing properties.
If you really want to ensure the view doesn't jump, you'll need to also store the selection beforehand, then reset it just before you resume the layout.