Simple question about text styles

General TRichView support forum. Please post your questions here
Post Reply
reiser
Posts: 25
Joined: Sat Jun 25, 2011 8:40 am

Simple question about text styles

Post 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!
reiser
Posts: 25
Joined: Sat Jun 25, 2011 8:40 am

Post by reiser »

Also, I forgot to mention that I would like to avoid using tables, so users could select portions of text easily.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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
reiser
Posts: 25
Joined: Sat Jun 25, 2011 8:40 am

Post by reiser »

Thank you, that worked :)
Post Reply