Re: Delphi TListBox


[ Delphi Forum -- by DelphiLand ]

Posted by WAllison on November 15, 2003 at 17:42:50:

In Reply to: Delphi TListBox posted by Joey on November 15, 2003 at 16:04:47:

: Im making my Delphi application have the ability to copy files using a for loop and then naming the file i.mp3 where i is the number.

: But i want it to read down the list ti copy them dependant on i. Example: i =1 so i takes item 1 i = 2to takes item 2 etc... but i cant find a property of Tlistbox that works in this way :S.

: I've tried .ItemIndex[i] and stuff like that and i just cant get it can n e 1 help? thx

----------------------------

Remember, the first index of the items is 0 (zero).

var 
  i: integer;
  Filename: string;
begin
  for i := 0 to ListBox.Items.Count - 1 do begin
    //Put copy code here
    Filename := ListBox.Items[i];
  end;

i hope this helps.



Related Articles and Replies:


[ Delphi Forum ]
[ DelphiLand: free Delphi source code, tips, tutorials ]