Recent

Author Topic: [SOLVED] fpspreadsheet Colorize part of text in Cell  (Read 3015 times)

Bearimprint

  • New member
  • *
  • Posts: 7
[SOLVED] fpspreadsheet Colorize part of text in Cell
« on: March 27, 2021, 12:14:14 pm »
Hi

I need to have part of text in cell in red color.
I use html format, like this: Blabalabala <font color "red"> My text in color red </font> blabalablabla
And that work fine, i have Blabalabala  My text in color red  blabalablabla  in cell.
But i have lot of text with symbols > and < and it's a big issue because all the text after the < is just ignored (because it's not html format)
I know fpspreadsheet use Richtext format (It's seem me) to have the same result but i don't find any clear explanation about how to colorize a part of text.

Any help would be appreciated.

« Last Edit: March 27, 2021, 07:31:00 pm by Bearimprint »

Bearimprint

  • New member
  • *
  • Posts: 7
Re: fpspreadsheet Colorize part of test in Cell
« Reply #1 on: March 27, 2021, 07:29:46 pm »
You can close this.
Even if is not why i'm looking for, i have found another way to solve the problem.
Simply replacing the symbol < by their equivalent in Html. For < is &lt;  (it can be viewed here: http://unicode.e-workers.de/entities.php )

wp

  • Hero Member
  • *****
  • Posts: 13646
Re: [SOLVED] fpspreadsheet Colorize part of text in Cell
« Reply #2 on: March 28, 2021, 07:22:25 pm »
IIRC there has been a similar request recently, and when I read the svn notes then I find this one which sounds similar: "fpspreadsheet: Fix (?) display issue with text cells containing incorrect html parts (such as '<'), https://forum.lazarus.freepascal.org/index.php/topic,52694.0.html".

So, I'd encourage you to test the svn version and find out whether the issue with '<' in the cell is really fixed. If you do not use svn you can still download the snapshot from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/.

 

TinyPortal © 2005-2018