c# - Displaying coloured text in a RichTextbox -
so have string of characters typically formatted this:
" text" bold character red.
i want display these types of strings in richtextbox bold character being red.
i have text in string variable , have location of red character (in string) in int variable.
my solution is:
- get characters before red character
- get red character
- get characters after red character
- display characters before red character
- display red character (with foreground = brushes.red)
- display characters after red characters
this i've got far:
https://github.com/icebbyice/rapide/blob/master/rapide/spreadwindow.xaml.cs
find: "//stackoverflow" (also, seperateoutputs not completed)
i stopped there because thought there had more efficient way because changing content of rich text box (up 1000 content changes / 60 seconds).
so, there better way this?
Comments
Post a Comment