Convert plain text to table

General TRichView support forum. Please post your questions here
Post Reply
mouse5312
Posts: 3
Joined: Fri Mar 31, 2006 2:54 pm

Convert plain text to table

Post by mouse5312 »

Hello,

I've got a program that filters text out of log files in Borland CBuilder 6.
Now I want to print this text (and a header/footer) in a nice table in TRichview (not TRichViewEdit).
But how do I make a table in TRichView, without using any database program?
MLefebvre
Posts: 191
Joined: Mon Aug 29, 2005 4:28 pm
Location: France
Contact:

Post by MLefebvre »

Tables in TRV are static text tables (collection of rows and cells), with no relationship at all to database tables. A RV Table is a special type of RV item in which, after having created it and added it into the main TRichView, you can add text in each cell as you would do for the main TRV. Just have a look at the help file, it makes things finally very easy.

If you need to sort or filter the text rows that you want to display, as far as I know RV does not do that at all, you have to handle that in your application (with TLists or TClientDataSets for instance) independently from RV and then build your RV table with the resulting data.

I hope this will help.
ML
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can see an example: how to load CSV files (files where data are separated by comma (or semicolon, or tab character) as a TRichView table: http://www.trichview.com/forums/viewtopic.php?t=406
For TRichView, use AddItem and Format instead of InsertItem.
Post Reply