TTMSFNCGrid: ampersand (&) is displayd as "_"

Hello,

If i like to show Text like "A & B" it is drawn as "A _ B". This may okay in some cases. I think in most cases it should be "A & B".

To solve the problem for my case i changed VCL.TMSFNCGraphics - TTMSFNCGraphics.DrawText:
I changed the line "dstyle := [];" to "dstyle := [tfNoPrefix]".

Maybe this should be an options with default "no prefix".

Greetings
Andreas Maier

The drawing is allowing to render text with accelerator characters, this is also the default behavior of TLabel. If you want to render an ampersand, you'll need to add 2 ampersands:


A && B

We will investigate if we can add an option to choose if accelerator characters are enabled.

Pieter Scheldeman2017-01-16 11:30:21

Thank you for fast response , as always.

Using 2 ampersand as you suggested works. Thank you.

Anyway, it would be nice if there will be an option in future. This would be more smart.

Greetings
Andreas Maier