Currency Formatting with Delphi -
i trying writte code in delphi, displaying given number in currency format this: now works if filled whole number , field until paramater updated. i'd happy have code displaying number in currency format writte it. i've tried manage typing this: procedure tform1.editzakladchange(sender: tobject); var zaklad: currency; begin zaklad := strtofloat(editzaklad.text); editzaklad.text := floattostrf(zaklad, ffcurrency, 10, 2); end; end. but everytime when someting typed in (zaklad field), error appears: could me that, please? make sure maxlength of edtzaklad 0. var form21: tform21; check:string; //to break loop. function getcurrency(num: string):string; var i: integer ; str:string; zaklad: currency; begin result := ''; := 1 length(num) begin if (num[i] in ['0'..'9']) begin str := str + num[i] ; zaklad := strtofloat(str); result := floattostrf(zaklad, ffcurrency, 10, 2); check := ...