I would like to print the output of an algorithm (C#,.NET 4.0)in a listview control or a multiline textbox(or rich textbox) strings containing some characters which are in a different color.For example:
ABCAAAGGGJHHJK (whole string black)
AHGGJI (H and I - red)
BAJMGC (B -green, J,M,C-red)
I know it is possible to change the text color & font for the whole control, but is it possible to generate it like this? Do you have any suggestions?
You can’t easily do it with a
ListBox, unless you’re willing to draw the items manually (which is a pain). It would probably be even harder with aTextBox. However, you can do it with aRichTextBox.