Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RowSource in list box
Message
From
23/02/2001 06:50:28
Garry Sankowsky
Zodiac Publications
Tolga, Australia
 
 
To
22/02/2001 20:45:39
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00478283
Message ID:
00478745
Views:
28
>Hi Garry,
>
>You could issue two ADIR() commands and then use ACOPY() to compile the arrays into a single array and have that array as the rowsource.
>
>Although it seems a bit much if you have lots of different files you want in the skeleton list.
>
>Michael Henstock
>AWS

Yes Michael, this will sort of work. I used the following code:
adir(listone, '*.bmp')
adir(listtwo, '*.jpg')
adir(listthre, '*gif')
adir(listfour, '*.dib')
adir(listfive, '*.wmf')

then I tried:

if aelement(listone, 1) > 0
acopy(listone, newlist)
endif

if aelement(listtwo, 1) > 0
acopy(listtwo, newlist)
endif

etc

but I find that if there is only one record in one of the arrays it does not appear in newlist.
If I leave out the if statements and there is nothing in one of the arrays I get an error message.
I need to be able to find out if the array does not exist so it can skip it.

I then use asort() to sort the names.

Otherwise it works fine.

Regards,
Garry

PS I have to admit that I do not know much about arrays!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform