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)


The ListBox has a property called Items..
this is an Abstract class of TStrings.
items[0..maxEntered-1] = entered_Items_in_The_List
Quote
Vincent Vijt wrote:
> 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)


try this

Var A:Integer;

Begin

For A:=0 to Listbox1.Items.Count-1 Do
        Begin
        {Actions}
        End;
End;

Hope this helps

Karl

On Tue, 12 Oct 1999 18:34:15 +0200, "Vincent Vijt"

Quote
<vi...@planetinternet.be> wrote:
>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