Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TRichEdit problem....

3 views
Skip to first unread message

rory

unread,
Dec 12, 2008, 7:52:13 AM12/12/08
to
I have a list of files stored in a folder. My routine below opens each
of these files and returns the information stored in them. That info
is then passed to an AnsiString which is passed to a TStringStream
object which I then load to a TRichEdit. The text includes rtf tags
and the idea is that my TRichEdit will display the text as rtf. My
only problem is that not all the text is appearing. It only goes as
far as entry 827 even though my loop runs through over a 1000 entries.
The other strange thing is that if I simply pass 'exportString' to my
TRichEdit all the text appears. Has it something to do with the rich
text format? I'm really stumped. Any suggestions welcome.

void __fastcall TForm1::PageControl2Change(TObject *Sender)
{
AnsiString exportString = "{";

for(int i=0;i<FileList->Count;i++)
{
catEntryText->Lines->Clear();
catEntryText->Lines->LoadFromFile(FileList->Strings[i]);
exportString+=InsertNumberTitleYear();
exportString+=InsertBody();
exportString=exportString+IntToStr(i);
}
exportString+="}";
TStringStream* string = new TStringStream(exportString);
exportRichEdit->Lines->LoadFromStream(string);
}

0 new messages