
Zitat von
Matze:

Zitat von
hhb_man:
begin
if CheckBox1.Checked := True then
Edit1.Text := IntToStr(StrToInt(Edit1.Text + 1));
end;
Wenn, dann so:
Delphi-Quellcode:
begin
if CheckBox1.Checked then
Edit1.Text := IntToStr(StrToInt(Edit1.Text + 1));
end;
wenn dann so
Delphi-Quellcode:
if CheckBox1.Checked then
Edit1.Text := IntToStr(StrToInt(Edit1.Text) + 1);
Diese variante hat allerdings den Nachteil das vorrausgesetzt wird das im Edit kein Text drin steht. Und wenn ich eine Checkbox mehrmals anklicke erhöht sich der wert auch immer weiter.