Saving an index with nodes

RobVanBrunschot

Member
Licensed User
Longtime User
Hello,

I am trying to make a program which shows files in their folders as a tree.
Therefor I use the treeview library.

I am as far as displaying all folders and files in a tree view but are unable to retrieve the filename with there coresponding nodedata when clicked on a tree item.
I have searched in this forum and found several trheads but i have no luck, it did not work so far.
Can someone help me.

I need to save some data per file and know that the tree1.imageindex can be used there. I need help to find out how it works. Saving the index to a node so I can match that number to a filename save in a list.

My source so far is enclosed.

regards, Rob
 

Attachments

  • Notes.sbp
    3.2 KB · Views: 190

specci48

Well-Known Member
Licensed User
Longtime User
Hello RobVanBrunschot,

maybe this link provides a very complex example but I think the PocketFileExplorer by RichardW contains what you are trying to do...


specci48
 

RobVanBrunschot

Member
Licensed User
Longtime User
Hello RobVanBrunschot,

maybe this link provides a very complex example but I think the PocketFileExplorer by RichardW contains what you are trying to do...


specci48

Hello specc48,

Thank you for the response,
I will check out the mentioned program but it is complicated, it will take time to find out all functionalities.

Regards, Rob
 

RobVanBrunschot

Member
Licensed User
Longtime User
Hello all,

I have looked to the given programs but they are so complicated I have not got time to find out all functionalities.

Can someone help me changing my code (post # 1) so I can give each item in the tree list a numeric index and retrieve that index number when an item in the tree is clicked.

That would help very much.

regards, Rob
 

RobVanBrunschot

Member
Licensed User
Longtime User
Did you see the FolderChooser sample (it is attached)?
See btnSelect_Click event as an example of finding the node full path.

Erel,

Thank you for the code, I am almost there I think.
Via FolderChooser I can find out at which folder I am.

But I am trying to add files in the tree but they keep on the same level and not in a upper one, there is no tree there, only a flat list.

Can you help me to accomplish that?

Thanks, Rob
(code in the uploaded file)
 

Attachments

  • FolderChooser.sbp
    894 bytes · Views: 188
  • FolderChooser.bas
    3 KB · Views: 195
Last edited:

RobVanBrunschot

Member
Licensed User
Longtime User
Erel,

Thanks for your help.
I now have a working structure to select folders or files and than knowing which is selected. I will continue working on my program and will post in a later stadium the results.

regards, Rob
 

RobVanBrunschot

Member
Licensed User
Longtime User
Erel,

May be you can help me with something?

My program works but not the same on the desktop and the device.

When run on the desktop, it works as I think it should, showing folders and files.
But on me device I only see the files in the root, any files in other folders don't appear.

Can you figure out what is wrong?

Thanks in advance.
Rob
 

Attachments

  • Notes.sbp
    8.9 KB · Views: 179
Last edited:

RobVanBrunschot

Member
Licensed User
Longtime User

Erel, forget about this problem, it was a case of different root folders, on my desktop with files and so it happens to be, on my device another location without files. My fault. It works okee now.

Sorry if you were already looking in to the code.

Greetings, Rob
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…