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

How to add dynamicly text to TppRichText and set different fonts?

edited September 2005 in RAP
Hi,

I have to add dynamicly text-block?s to an TppRichText while runtime
and set properties like "font" and "bold" to each of these text-blocks.

Any ideas how to do this in rap?

Regards,

Jan


--
EasternGraphics - visualize your business

Jan Hoffmann, Entwicklung
http://www.EasternGraphics.com
phone: +49 3677 6782 - 0
fax: +49 3677 6782 - 50

--

Diese E-Mail enth?lt vertrauliche und/oder rechtlich gesch?tzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrt?mlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren,
Weitergeben, Ver?ffentlichen sowie sonstiges Verwenden dieser E-Mail
oder der darin enthaltenen Informationen ist nicht gestattet.

This e-mail may contain confidential and/or legally protected
information. If you are not the intended recipient (or have received
this e-mail in error) please notify the sender immediately and delete
this e-mail. Any unauthorised copying, retransmission, dissemination
or other use of this e-mail or the contained information is prohibited.

Comments

  • edited September 2005
    Hi Jan,

    The TppRichText methods SelStart, SelLength, and SelAttributes are available
    in RAP, however I believe you will need to create a pass-thru function to
    alter the TTextAttributes of the richtext control. See the TppRichText
    topic in the ReportBuilder help for information on the above routines as
    well as TTextAttributes in the Delphi help. For an example of a RAP
    pass-thru function see the ReportBuilder Developer's guide.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2005
    Hi Nico,

    it works fine with the pass-thru function :)

    Another question: has anyone an idea how to get an linebreak into an
    rtf - text like:

    rtfSum.Richtext := 'my first row' + LINEBRK + 'my second row';

    All signs i tried for linebreaks are interpreted as simple text.



    Regards,



    Jan


    available
  • edited October 2005
    Hi Jan,

    According to some delphi posts on line the following should work
    correctly...

    rtfSum.RichText := 'my first row' + #13#10 + 'my second row';

    Note: I believe the RTF code for a crlf is \par.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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