![]() |
Label berechnen...Komma
Hallo, ich möchte einen Wert mit 2 Nachkommastellen haben.
Bin ich mit Round auf der richtigen Spur? Bei meinem Bespiel wird das Komma abgeschnitten.
Delphi-Quellcode:
QRLabel14.caption:=floattostr(strtofloat(QRLabel14.caption) - strtofloat(QRLabel11.caption));
Freundliche Grüße Steven |
Re: Label berechnen...Komma
Guck die mal
![]() |
Re: Label berechnen...Komma
Delphi-Quellcode:
QRLabel14.caption := Format('%f', [44.5478554]);
|
Re: Label berechnen...Komma
Ich bin zu doof:
Delphi-Quellcode:
Wie geht das?
QRLabel14.caption:=Format('%f', [floattostr(strtofloat(QRLabel14.caption) - strtofloat(QRLabel11.caption)));
Hab hier zwar was gelesen, verstehe aber nur Bahnhof: ![]() |
Re: Label berechnen...Komma
als argument wird ein float erwartet:
Delphi-Quellcode:
QRLabel14.caption := Format('%f', [strtofloat(QRLabel14.caption) - strtofloat(QRLabel11.caption)]);
|
Re: Label berechnen...Komma
Danke...du hast mir sehr damit geholfen.
Freundliche Grüße Steven |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:16 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz