Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Rich text as fixed

edited January 2004 in General
Subject - Rich text as fixed

I have got a TppRichText component on the Report.

I succesfully get some text to appear by coding :-

MyRichText.RichText := 'Some text';

However I want the text to be fixed spacing and not proportional.

I tried coding :-

MyRichText.RichText := 'Some text';
MyRichText.Font.Pitch := fpFixed;
MyRichText.Font.Name := 'System';

but the text was still proportional.

I tried coding :-

MyRichText.SelectAll;
MyRichText.Font.Pitch := fpFixed;
MyRichText.Font.Name := 'System';

but the text was still proportional.

How do I get the text to come out fixed?

Regards, Peter Evans

Comments

  • edited January 2004
    Hi Peter,

    The TppRichText works very similar to the TRichEdit component in Delphi.
    Your second attempt was very close to what you need to do. First call
    SellectAll, then instead of changing the Font directly, you need to access
    the SelAttributes property to adjust the text properties. Check out the
    help on TTextAttributes for the properties you can edit to change your
    RichText output.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.