Delphi: Yet another TListBox and TOpenDialog problem! :S


[ Delphi Forum -- by DelphiLand ]

Posted by Allison on November 16, 2003
In Reply to: Re: Yet another TListBox and TOpenDialog problem! :S posted by Joey

: Thank you - i realized i made a mistake on the moveselection dat was silly :$

: And thank for pointing out that it does come out in an order i should check my stuff thourgly (im turning into microsoft).

: But the things add to the list in the wrong order they add backwards :S example say i ahve files 1 - 18 and i select 1 - 18 then they add to my list box as 18 - 1 how can i switch this or....

: You gave me loop to copy before how could i run this look the other way round to copy from bottom to top? (the top 1 of re-organizing them would be better).

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

Just workthru backwards - etc:

var i: integer;
begin
  i := OpenDialog1.Files.Count - 1;
  while i > 0 do
   begin
    Filename : = OpenDialog1.Files[i];
    i := i - 1;
   end;
end;


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