Einzelnen Beitrag anzeigen

Tumm

Registriert seit: 17. Jun 2006
Ort: Celle
171 Beiträge
 
Turbo Delphi für Win32
 
#8

In einer Schleife - Checkboxen auslesen

  Alt 23. Nov 2006, 17:27
Hi

Ich hab das so angewendet:
Delphi-Quellcode:
while c3 < 29 do begin
Inc(c3);
if TCheckbox(FindComponent('CheckBox' + IntToStr(c3))).Checked = true then begin
if durckm.ItemIndex = 1 then
a.Add(TCheckbox(FindComponent('CheckBox' + IntToStr(c3))).Caption + ' hat abgeben!') else
Memo1.Lines.Add(TCheckbox(FindComponent('CheckBox' + IntToStr(c3))).Caption + ' hat abgegeben!');
end else begin
if durckm.ItemIndex = 1 then
na.Add(TCheckbox(FindComponent('CheckBox' + IntToStr(c3))).Caption + ' hat nicht abgegeben!');
Memo1.Lines.Add(TCheckbox(FindComponent('CheckBox' + IntToStr(c3))).Caption + ' hat abgegeben!');
end;
end;
c3 = Integer, a = Tstrings, na = Tstrings, Memo1 = Memo

Aber es geht nich! (Zugriffsverletzung)
Code Gear = Kot Gier
  Mit Zitat antworten Zitat