Page 1 of 1

Simple question about text styles

Posted: Thu May 29, 2014 10:08 am
by reiser
Hello,

I have external class which processes some data and parses it to the TStringList component, as readable lines/strings.

This works fine, but the outputted text is plain, and I want to make it look nicer. My idea is to use RichView and add colours to the text.

Here is the example of what I'm aiming for:

Image

Now, the problem is that class generates this data before it's shown in RichView. Are there some tags that I can add to strings, to make RichView interpret them as styles? For example, I could add another TStringList class, which would contain text that would get imported in RichView, and that would contain tags for styles?

Thanks!

Posted: Thu May 29, 2014 12:27 pm
by reiser
Also, I forgot to mention that I would like to avoid using tables, so users could select portions of text easily.

Posted: Thu May 29, 2014 6:23 pm
by Sergey Tkachenko
Is it really necessary to parse strings in TStingList?
You can parse them directly in TRichView. In this way you do not need to invent how to store styles.
A sample of parsing can be found here: http://www.trichview.com/forums/viewtopic.php?t=63

Posted: Thu May 29, 2014 10:20 pm
by reiser
Thank you, that worked :)