Einzelnen Beitrag anzeigen

Alibi

Registriert seit: 15. Aug 2003
Ort: Bispingen
94 Beiträge
 
Delphi 7 Personal
 
#5

Re: For Schleife in Abhängigkeit der Zeilen aus Listbox

  Alt 11. Mär 2004, 21:12
So ungefähr:
Delphi-Quellcode:
var
  deine_laenge, i: integer;
begin

  for i := 1 to [anzahl der radiobuttons] do
  begin
    if (FindComponent('Radiobutton' + inttostr(i)) as TRadioButton).Checked then
    begin
      deine_laenge := (FindComponent('ListBox' + inttostr(i)) as TListBox).count - 1;
      break;
    end;
  end;

  for i := 0 to deine_laenge do
  begin
    ///////
  end;

end;
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.
  Mit Zitat antworten Zitat