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

Paragraph tabs for

edited July 2008 in General
Hi,

Delphi7, ReportBuilder 10.07 on WinXp apply.

I can't figure out how to change the tab width for TppRichText.


My code where I'm using:

s := '';
j := -1;
ppRichText1.Clear;
ppRichText1.Paragraph.Tab[1];


for i := High(MinClass) downto 0 do
begin
inc(j);
if i = High(MinClass) then
s := MinClass[i]
else
begin
sTab := sTab + #9;
s := s + #13 + sTab + MinClass[i];
end;
end;

ppRichText1.RichText := s;
ppRichText1.SelectAll;
ppRichText1.SelAttributes.Size := 6;


MinClass is a dynamic string array, populated from a treestructure in a
database.
The statement: ppRichText1.Paragraph.Tab[1]; has no effect whether I use
Tab[1] or Tab[10]
The report units is millimeters.

The effect I'm trying to achieve:
aaaaaaaaaaaa
bbbbbbbbbbbb
cccccccccccccc



Regards,

Nols Smit

Comments

  • edited July 2008
    Try getting it to work using a Delphi TRichEdit, outside of ReportBuilder.
    Then try adapting that code to the RB TppRichText. The TppRichText is a
    wrapper around the TRichEdit component.

    I would try first assigning the text to the control, then do a select all.
    Then set the paragraph formatting. Perhaps it works only on the selected
    text.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.