Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.241 Beiträge
 
Delphi 12 Athens
 
#4

AW: RadioButtons und CheckBoxen

  Alt 15. Nov 2010, 14:19
Delphi-Quellcode:
case MeineRadioGroup.ItemIndex of
  0: b := a + 1;
  1: b := a + 2;
  //usw. usf.
end;
In diesem Fall sogar noch einfacher.
Delphi-Quellcode:
a := StrToFloat(Edit1.Text);
b := a + MeineRadioGroup.ItemIndex + 1;
Edit2.Text := FloatToStr(b);

// aka

Edit2.Text := FloatToStr(StrToFloat(Edit1.Text) + MeineRadioGroup.ItemIndex + 1);
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests

Geändert von himitsu (15. Nov 2010 um 14:21 Uhr)
  Mit Zitat antworten Zitat