windows explorer and tree
Author: mps59@orange.fr (mpservices)
Hello I would like to reproduce the windows explorer in a tree widget. the standard solution is to read the directories in a recursive way Is there a faster method ? thanks in advance for answers Best regards Dominique
7 Comments
Local Administrator
Yes, but it depends on the infos you want to display. Can you give us more details, please?
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
just name of rep and files just to show the user the hierarchy of the structure of the files on the disk and allow him to click on a file to open it so very minimalist view
Author: mpservices (mps59@orange.fr)
Local Administrator
what about spawning something like "dir/s > mydir.out" and analyse the result in mydir.out ? It's much faster than reading each directory separate. You can experiment which set of switches will be best for your purpose. I would recommend to use the /n switch because timestamp and size are in fixed places which makes the lines easier to parse in uniface.
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
Thanks Ulrich I will do this method
Author: mpservices (mps59@orange.fr)
Local Administrator
Hi mpservices, When the tree is becoming complex a good option is to build it step by step while the end user is navigating into it. In the first step only root or root plus level one is presented; every item has a + sign in front of it. When the user is clicking on a + sign the next level is composed using "expand" extended trigger and presented on video while the + sign is changed to a - one or to nothing when no further level is available. This method is requiring few program lines and there is no initial delay to compose the whole tree. Performances are very good whatever it is the tree size: from a couple of rows on a single tree level to thousands of rows on many tree levels. Hope it helps! Gianni
Author: gianni (gianni.sandigliano@unifacesolutions.com)
Local Administrator
What about to use the statement "filebox" ?
Author: Lauterbach (norbert.lauterbach@infraserv.com)
Local Administrator
Sample code is available on http://unifaceinfo.com/community-samples/ Check for
Author: Arjen van Vliet (arjen.van.vliet@uniface.com)