Board index » delphi » FileListBox Question

FileListBox Question

I need to use Timer1 OnTimer to progressivly move through items in
FileListBox1, starting with the selected file. If no file is selected, then
select first file in list and begin. (Slideshow)
Can someone show how I might do this.
Thanks. Paul.

 

Re:FileListBox Question


assume there is a filelistbox somewhere and a ttimer

procedure ontimer();
begin
 reload timer...
 if (filelistbox.itemindex<filelistbox.items.count) then
   filelistbox.itemindex:=filelistbox.itemindex+1;
end;

procedure filelistbox.onchange();
begin
 if filelistbox.itemindex>=0 then
  slide.loadfromfile(filelistbox.filename);
end;

Rene

Quote
Paul wrote:

> I need to use Timer1 OnTimer to progressivly move through items in
> FileListBox1, starting with the selected file. If no file is selected, then
> select first file in list and begin. (Slideshow)
> Can someone show how I might do this.
> Thanks. Paul.

Other Threads