dabbiX
asked on
FormatFloat in Delphi
How to use FormatFloat in Delphi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
easiest way : you set that in the memo option
memo1.Alignment := taRightJustify;
memo1.Alignment := taRightJustify;
ASKER
memo1.Alignment := taRightJustify;
that is no way.
I want memo1.Lines.Add('d.. '+Edit2.Text);
to by RightJustify
that is no way.
I want memo1.Lines.Add('d.. '+Edit2.Text);
to by RightJustify
ASKER
s :=FormatFloat('#,##0.00',d ebet);
s1 :=FormatFloat('#,##0.00',d ebet);
memo1.Lines.Add('d.. '+s);
memo1.Lines.Add('d.. '+s1);
s and s1 to by = RightJustify
s1 :=FormatFloat('#,##0.00',d
memo1.Lines.Add('d.. '+s);
memo1.Lines.Add('d.. '+s1);
s and s1 to by = RightJustify
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Dabby !
Did we gave you enough info about how to use Format functions ? There is plenty more information in Delphi Help.
LocaleFormatSettings can give you also a lot of options to control how your application can format values (floats, dates, time etc..) but I recommend not playing too much with those, except if you really need setting specific display standards in your entire application. Playing too much with those global settings could well have an undesired effect on other components, some of which you maybe don't have the code.
PS : Thanks Geert for the %n tip, I have always overlooked that one. I don't use much thousand separators, but who knows, maybe one day I will need it !
Did we gave you enough info about how to use Format functions ? There is plenty more information in Delphi Help.
LocaleFormatSettings can give you also a lot of options to control how your application can format values (floats, dates, time etc..) but I recommend not playing too much with those, except if you really need setting specific display standards in your entire application. Playing too much with those global settings could well have an undesired effect on other components, some of which you maybe don't have the code.
PS : Thanks Geert for the %n tip, I have always overlooked that one. I don't use much thousand separators, but who knows, maybe one day I will need it !
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
ASKER
ok
in memo;
Edit2.Text :=FormatFloat('#,##0.00',d
Edit3.Text :=FormatFloat('#,##0.00',k
memo1.Lines.Add('d.. '+Edit2.Text);
memo1.Lines.Add('k.. '+Edit3.Text);
How to get Algin := Right ;