| View previous topic :: View next topic |
| Author |
Message |
Quatre87 Valued Newbie
Joined: 07 Jan 2004 Posts: 25
|
Posted: Fri Mar 05, 2004 11:08 pm Post subject: Filelist in tables |
|
|
| I want to add files from a folder on a table, but in two columns and the filelist only can do it in one. What can i do it? |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Mar 05, 2004 11:29 pm Post subject: |
|
|
I'm not sure if this is what you are looking for, but you might like to look
at the FILELIST element of the VDSOBJ extension.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat Mar 06, 2004 12:16 am Post subject: |
|
|
Create a string list and have the string list take in the filelist. Then
you can go line for line taking the files in the list and doing what you
want with them first before adding them to the table element.
There's a file search example floating around the main vdsworld site
that I made that might give you some ideas of what and how to do
this.
You see, if dump the filelist in a string list first, then you can process the
files to get all the information about them first before displaying them in
the table element, such as file size, attributes and so on. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
Quatre87 Valued Newbie
Joined: 07 Jan 2004 Posts: 25
|
Posted: Sat Mar 06, 2004 1:01 am Post subject: |
|
|
| I did it too, and yes, copy the files in the other column, but copy all in ONE line, and in the end of the file appear a character like "" |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Mar 06, 2004 11:14 am Post subject: |
|
|
Here is a basic example of how to add files from a list into a table element...
| Code: | DIALOG CREATE,Filelist dialog,-1,0,448,308
DIALOG ADD,TABLE,FILELIST,10,5,440,290,Filename[250]|Size[170]
DIALOG SHOW
# Create a list
list create,1
# Load the files from a directory in the list
list filelist,1,@windir()
# Begin with the first item
%z = 0
# Repeat this until "%z" is equal to the number of items
repeat
# Add some stuff to the list. @item(1,%z) holds the current name of the file. You
# can use @file() to get other things, like the size of the file. Use @tab() to
# add text to the next column.
list add,FILELIST,@item(1,%z)@tab()@file(@item(1,%z),z) bytes
# Next item
%z = @succ(%z)
until @equal(%z,@count(1))
# Close the list
list close,1
:Evloop
wait event
goto @event()
:Close
exit |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|