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

Defining custom TabStops for TppRichText?

Hello,
We have a TppRichtext that is supposed to be filled with text that contains tabulator chars.

To simulate columns we want to add custom tabstops to that control.

In Delphi i would write:

richtext1.Lines.Clear;
richtext1.Paragraph.TabCount := 3;
richtext1.Paragraph.Tab[0] := 80;
richtext1.Paragraph.Tab[1] := 150;
richtext1.Paragraph.Tab[2] := 200;
richtext1.Lines.Add('Test1'#9'Test2'#9'Test3');

However in TppRichText i have no access to the "Paragraph" property (although the help says that it decends from the Delphi class...).

How can i define custom tabstops in a TppRichEdit?

Thanks in advance,
Ralf

Comments

  • Addendum: We want to set the tabstops inside the calculations (BeforeGenerate)!
  • Hi Ralf,

    The TppRichText.Paragraph is included in the RAP RTTI however it does not expose all its descendent properties such as the Tab property. If you would like to access these properties in RAP you will either need to enhance the RTTI logic or create a pass-thru function in Delphi.

    I will add it to our list of possible enhancements to expose more of the TParaAttributes properties to RAP RTTI for a later release.


    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.