Einzelnen Beitrag anzeigen

Benutzerbild von Olli73
Olli73
Online

Registriert seit: 25. Apr 2008
Ort: Neunkirchen
662 Beiträge
 
#4

AW: Nur das größte Ergebnis wird angegeben (Rechner mit Checkbox und Radiobox)

  Alt 1. Feb 2013, 17:36
Code:
procedure TForm1.Button2Click(Sender: TObject);
begin
  if radiobutton1.Checked then begin
    label7.Caption := '0';
    if checkbox1.Checked then
      label7.caption := floattostr(strtofloat(label7.caption) + strtofloat(edit1.Text));
    if checkbox2.Checked then
      label7.caption := floattostr(strtofloat(label7.caption) + strtofloat(edit2.Text));
    if checkbox3.Checked then
      label7.caption := floattostr(strtofloat(label7.caption) + strtofloat(edit3.Text));
    if checkbox4.Checked then
      label7.caption := floattostr(strtofloat(label7.caption) + strtofloat(edit4.Text));
  end;
end;
  Mit Zitat antworten Zitat