0

I'm using

DisplayFormat := ',####,####.#';

Items that are zero are shown as blank.

Is there a way to change the above format so that values that are zero continue to be blank, but items < 1.0 appear with a leading zero, like 0.65 ???

The format:,

DisplayFormat := ',####,###0.#';

shows the leading zero when values are less than 1.0.

But, unfortunately, items that are 0 are no longer blank.

I need, thus, some sort of conditional formatting.

Related to Delphi TFloatField.DisplayFormat for numeric fields less than 1.0

Community
  • 1
  • 1
Tom
  • 565
  • 1
  • 5
  • 21

1 Answers1

2

DisplayFormat has three parts separated by semicolon. The third part represents the value 0.

DisplayFormat := ',####,###0.#;;';
Uwe Raabe
  • 45,288
  • 3
  • 82
  • 130