![]() |
AW: Nur das größte Ergebnis wird angegeben (Rechner mit Checkbox und Radiobox)
Delphi-Quellcode:
Ich würde es lieber so machen, weil sonst Label7 eine "alte" Summe anzeigt, wenn keine Checkbox markiert ist.
var
i:Integer; sum:Double; begin sum := 0; if RadioButton1.checked then for I := 1 to 4 do if TCheckBox(FindComponent('Checkbox' + IntToStr(i))).Checked then Sum := Sum + StrToFloat(TEdit(FindComponent('Edit' + IntToStr(i))).Text); Label7.Caption := FloatToStr(sum); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:08 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