Board index » delphi » listbox problem (newbie)

listbox problem (newbie)

Hi,

in the listbox i have a number of
links to files (the number of links is not constant because they are read
into the listbox from a file)

when the startbutton is pressed, thefirst link is used and a number of
actions are done with the linked file, when these actions are done, the
program mus t  go read the next link in the listbox an ddo the same actions
with that file, and this must be done until all the files were processed,
but because you don't know how many links there are in the listbox, you must
use something like this:

- read first link in listbox
- perform actions
- when actions complete
- read next link in listbox (can't use read second line of listbox)
- when actions complete
- read next link in listbox
- when actions complete
....
- until all links are processed

please help,

thanks in advance,

Vincent.

vi...@pi.be

 

Re:listbox problem (newbie)


for i := 0 to (aListBox.Items.Count - 1) do
    DoTheWork (aListBox.Items [i]);

Quote
Vincent Vijt <vi...@planetinternet.be> wrote in message

news:7tvneb$l1b$1@news.planetinternet.be...
Quote
> Hi,

> in the listbox i have a number of
> links to files (the number of links is not constant because they are read
> into the listbox from a file)

> when the startbutton is pressed, thefirst link is used and a number of
> actions are done with the linked file, when these actions are done, the
> program mus t  go read the next link in the listbox an ddo the same
actions
> with that file, and this must be done until all the files were processed,
> but because you don't know how many links there are in the listbox, you
must
> use something like this:

> - read first link in listbox
> - perform actions
> - when actions complete
> - read next link in listbox (can't use read second line of listbox)
> - when actions complete
> - read next link in listbox
> - when actions complete
> ....
> - until all links are processed

> please help,

> thanks in advance,

> Vincent.

> vi...@pi.be

Other Threads