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

Setting text DBRichText

edited February 2009 in General
I neede to add an asterisk '*' to a DBRichText field if its value
is 'Member amount' but I cannot seem to get this to work.

I was able to do it in a DBText field in the OnGetText method by the
following:

if Text = 'Member amount' then
Text := Text + '*';

This doesn't work in the OnGetRichText method.

Can you help please?

Many thanks,

Tim Pepper.



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited February 2009
    Hi Tim,

    To access the DBRichText data, you can use the DBRichText.RichText property.
    If you would like to just access the readable text of a RichText component,
    you will need to use the Selection properties and routines. Something like
    the following...

    ppRichText.SelectAll;
    ppRichText.SelText := ppRichText.SelText + '*';

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