I need some help with Livebindings.
I need some help with Livebindings.
I have a TLabel component linked with a TIntegerField.
Currently, I have the next CustomFormat property: %s+"%%"
and it works well. Shows the number of the field with a percentage sign at the end.
What I need is an expression that shows the same but if the value is 0 (zero) show "---" instead of the value.
I've tried things like IfThen(%s = 0, "---", %s + "%%") or
IfThen(ToStr(%s) = "0", "---", %s + "%%")
but I always get "No argument for format..." error.
I think is because I use two %s. But how I do this then?
Thanks in advance.
Use the index of the parameter. So instead of %s write %0:s
ReplyDeleteDavid Heffernan
ReplyDeleteThank's.
Attila Kovacs
ReplyDeleteSeems your code can work too. I've do not tried is but, thanks anyway.
One only more thing. I can't understand why, but G+ has marked your message as spam. I've removed this mark.