Page 1 of 1
Convert plain text to table
Posted: Fri Mar 31, 2006 3:04 pm
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?
Posted: Sat Apr 01, 2006 9:05 am
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
Posted: Sat Apr 01, 2006 12:02 pm
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.