Jump to content
Sign in to follow this  
blitzkrg

searching treeview?

Recommended Posts

blitzkrg

Is it possible to search a treeview?

I have dynamically created a tree with files from the hard drive.

If i wanted to search that tree and see if a particular file has been added already

how would i do that?

Share this post


Link to post
Share on other sites
seandisanti

Is it possible to search a treeview?

I have dynamically created a tree with files from the hard drive.

If i wanted to search that tree and see if a particular file has been added already

how would i do that?

actually the only treeview i've ever worked with was the one for your playlist generator, but i didn't hold onto the code from it. could you provide the full code for the gui?

Share this post


Link to post
Share on other sites
blitzkrg

yeah same program :-)

i'm on to the next part of the process.

dragging and dropping new files.

basically the 1st thing that's going to happen is it will poll the device and see whats on it, then put all that into a treeview (thats the part you and i were looking at)

I couldnt decide which way to go from here. Either create a new tree view with new files

or just add new files to the existing view and put a button out there that says "sync" and when it's pressed, it will do any deletions or additions @ that point.

I basically have the same problem i had before.

when i add a new item, if it already exist in the tree

say for example "metallica" i want it to add it under the existing artist.

not create a new one.

My last problem was resolved by re-ordering my code.

since these are new functions i cant get so lucky.

My thought is to "search" the tree and IF metallica exist, then add under it. if it does not, then add a new entry.

but i dont know that i can "search"..

anyhow.. that's where i'm at.. i'll get my code together for you after lunch.

Share this post


Link to post
Share on other sites
seandisanti

yeah same program :-)

i'm on to the next part of the process.

dragging and dropping new files.

basically the 1st thing that's going to happen is it will poll the device and see whats on it, then put all that into a treeview (thats the part you and i were looking at)

I couldnt decide which way to go from here. Either create a new tree view with new files

or just add new files to the existing view and put a button out there that says "sync" and when it's pressed, it will do any deletions or additions @ that point.

I basically have the same problem i had before.

when i add a new item, if it already exist in the tree

say for example "metallica" i want it to add it under the existing artist.

not create a new one.

My last problem was resolved by re-ordering my code.

since these are new functions i cant get so lucky.

My thought is to "search" the tree and IF metallica exist, then add under it. if it does not, then add a new entry.

but i dont know that i can "search"..

anyhow.. that's where i'm at.. i'll get my code together for you after lunch.

yes i understand what you're trying to do, i just don't have your code anymore to try to do it myself... that's why i was asking for code again :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.