Loading text in columns

General TRichView support forum. Please post your questions here
Post Reply
rvu
Posts: 5
Joined: Wed Mar 28, 2007 10:14 am

Loading text in columns

Post by rvu »

Hello
I want to load a file (txt, rtf) into 2 columns in the TRichViewEdit component.
What is the method for doing this ?

Thanks
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Only separating it in two pieces and loading in table with 2 columns
rvu
Posts: 5
Joined: Wed Mar 28, 2007 10:14 am

Post by rvu »

Hello
I created a table Like this :

Code: Select all

Tbl := TRvTableItemInfo.CreateEx(1,2,RichView1.RVData);
  RichView1.AddItem('table', Tbl);
  RichView1.Format;
then I loaded a text file into the first column like this :

Code: Select all

 if OpenDialog1.Execute then
  begin
    tbl.Cells[0,0].LoadText(OpenDialog1.FileName,0,0,True);
    RichView1.Format;
  end;
But the text only flows in the first column and not the second. I want the text to automatically flow into the second column after it has filled the 1st column.

What i really want to do is :
The amount of text that fits in the 1st column of the RichView1 control should be considered as 1 page and the next page in column 2 and so on.
So that when i scroll, both columns will load odd and even page numbers.
Is this possible ? Can you please show a way ?

Thanks a lot for help.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

No. It's not possible, it's a table, not real columns.
Columns are not supported yet.
You can print document in two columns using TRVReportHelper, though
rvu
Posts: 5
Joined: Wed Mar 28, 2007 10:14 am

Post by rvu »

Thank you Sergey
Post Reply