Reputation: 1147
I have a form with a label, in which I want to put the variable 'accuracy' of type Real along with the symbol '%' (e.g. in format 57,49%). Is that even possible with a Label? I tried googling but didn't find anything relevant. Thanks a lot.
Upvotes: 1
Views: 1806
Reputation: 31443
Label1.Caption := Format('%.2f%%', [accuracy]);
The second %
escapes the percent symbol and treats it as a part of the actual string (and not a format string).
Upvotes: 8