![]() |
Help function ProgressPercent
Help function ProgressPercent
I'm trying to use function ProgressPercent But it works only > LabelPct.Caption: = IntToStr (ProgressPercent) + '%'; I wanted to add + chr (48 + OveralPct mod 10) + '%' '.'; failing to add is not correct (Example: stay like 45.4%) Can anyone help Quote:
|
Use this
Function FloatToStrDeci(Float: Extended; DeciCount: Integer): String; Begin Result:= Format('%.'+IntToStr(DeciCount)+'n', [Float]); StringChange(Result, ',', ','); while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = ',')) and (Pos(',', Result) > 0) do SetLength(Result, Length(Result)-1); End; FloatToStrDeci(Float value,The number of decimals you want) |
I can not add
LabelPct.Caption := |
Well you have to declare and create one if you can't use the object.
|
| All times are GMT -7. The time now is 23:14. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com