Discussion:
QRRichText in QReports
(too old to reply)
Barry
2007-11-09 11:27:01 UTC
Permalink
Does someone have the methods and properties for QRRichText. I can seem
to find the help, I am sure I used to have.

All I am wanting to do is to change the colour of the text of a line,
between black and red, depending on whether the result is compliant or
not. Very basic, but can't find the color property.

Thanks

Barry
Clayton Arends
2007-11-09 17:12:06 UTC
Permalink
I'm not positive of this but I believe you don't work with TQRRichText in
that way. It will handle any rich text input but you can't alter the
properties directly in TQRRichText. However, what you can do is use a
scratch TRichEdit and when the text is exactly how you want it do something
like the following:

TQRRichText* QRRichText1; // The QuickReport rich text control
TRichEdit* scratchEdit; // The scratch rich edit
TMemoryStream* stream; // Temporary stream for saving/loading

// ... format your text in scratchEdit

scratchEdit->Lines->SaveToStream(stream);
stream->Position = 0;
QRRichText1->Lines->LoadFromStream(stream);

HTH,
Clayton

Loading...