Rich text as fixed
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
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
This discussion has been closed.
Comments
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com