The syntax is correct for Builder 6. It compiles and runs. It just does not produce the string correctly. ie the string is empty. (The code completion feature of Builder even suggest that it is ok to use sprintf on a Labels Caption property)
woops soory i meant sprintf.
sprintf is an AnsiString (String) function. It will work when u declare a String ie
String str;
str.sprintf("test %d", 10);
It does not work (for me anyway) when u try to use it like this:
Label1->Caption.sprintf("test %d", 10);
Why is this...
Sorry if this has been asked before but :(
The String.printf() function does not seem to work for Label->Caption.
I know there are ways around this (assign to new String first etc.) but why does it not work?
Thanks for any help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.