Building a treeview in XOJO

I haven’t looked at WFS in a long time, but if you get a memoryblock from FindFirstFile / FindNextFile (which if I remember is what WFS uses), the directory flag is in the first 4 bytes:

// mb is the memoryblock returned from the API
if (mb.Long(0) and 16) = 16 then
   // it's a directory
else
   // it's a file
end

[quote=40441:@A Himmit]Hi Paul,
Do you have the code from the example? Is it able to handle large folders?

I was able to create such a solution, its very slow on large folders. Is there a trick to get a better performance?

Thanks[/quote]

If you are using this to select folder items why not have a look at the native FolderItem Classes? Will these work:

OpenFolderDialog & SelectFolderDialog - See the language reference…

These are very easy to implement.

I happened to read something about WinForms TreeView weeks ago. I am wondering many similar questions in the XOJO treeview. This is a good thread with interesting discussions.