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

Changing the Font of a DBRichtext

edited January 2007 in RAP
Is there a way to assign a certain font to a DBRichtext at runtime,
overriding the font information contained in the RTFtext?

Comments

  • edited January 2007
    Hi Walter,

    In order to change the text attributes of a richtext component, you will
    need to use the TppRichText properties SelText, SelLength, SelStart to
    define the text to be altered, then assign the attrubutes using the
    SelAttributes property. Take a look at the following properties in the
    RBuilder help for more information.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2007
    Nico Cizik (Digital Metaphors) schrieb:

    I tried to do that in RichTextonPrint, but obviously SelAttributes is
    read only. Inside RAP TTextattributes is unknown, and trying to access
    SelAttributes.Name or SelAttributes.Size results in a compilation error.
    I then defined a passthrough function with a Parameter of Type
    TppCustomRichtext, where I was able to set all the properties of
    SelAttributes. BTW, in this project I'm still using RB 7.03.
    Do you have any idea where my train of thought took a wrong turn?
  • edited January 2007
    Hi Walter,

    Sorry, yes you will need to create a pass-thru function to access the
    various properties of the TTextAttributes object. In your message below you
    mention that you already do this. Is this not working or are you receiving
    an error of some sort?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2007
    Nico Cizik (Digital Metaphors) schrieb:

    yes, it works, but from the documentation and your mail I got the
    impression that it should work with the Reportbuilder Components.
    Perhaps the helpfile should be more clear about this.
  • edited January 2007
    Hi Walter,

    Thanks for the feedback. I will take a look at this and possibly have it
    re-worded for a later release.

    --
    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.