Jump to content
Jewtus

Add Files to treeview

Recommended Posts

Melba23

Jewtus,

As it does on my Win7 machine - which leads to the conclusion that it is probably a Win10 issue, and as I have no access to a Win10 machine to test leaves little chance of resolving the issue for you. Sorry.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Melba23

Jewtus,

While poking around in the UDF I have discovered a possible scenario where the additional items are added to the first TreeView element regardless of which was clicked - which matches your symptoms. I do not know if this edge case - which should only affect _CFF_Embed and is extremely unlikely to occur (I only noticed by chance) - is the cause of your problem, but given the similarity in effect it seems worth looking to see if it does. Can you run your script with these 2 versions of the UDF and see what you get in the SciTE console:

 <snip> - This is the current version with a few lines of debugging code added

<snip> - this is the version modified to correct the edge case with the same debugging code

You should see a lot of "Native TV: True/False" lines appear in the console. If you use _CFF_Choose they should all be True - using _CFF_Embed it will depend on the type of TreeView you pass to the UDF. As I said above, as far as I can see the edge case should only affect _CFF_Embed, but I am clutching at straws here.

M23

Edited by Melba23
Removed Beta code

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Jewtus

I tried the debug version and it works if I click a few times, but it also duplicates the entries under each tree. I'll see if I can spool up a VM for you to mess around with... do you have a VM Player?

Share this post


Link to post
Share on other sites
Melba23

Jewtus,

Try this version and see if it gets rid of the duplicate entries:

M23

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Jewtus

I'll try this when I get home. Thanks for your help Melba! Hopefully this puts my issue to bed.

Share this post


Link to post
Share on other sites
Jewtus

Unfortunately, the issue is still persistent. I expand the C drive and collapse it a few times and it does duplicate the entries. This is the console out:

Quote

Native TV: True
Native TV: True
Native TV: True
Native TV: True
Native TV: True

 

Share this post


Link to post
Share on other sites
Melba23

Jewtus,

How are you expanding/collapsing the drive? Clicking on the associated [+], double-clicking the drive letter (i.e. the TreeView item itself), or a mixture of the two?

And when you say "duplicate", do you mean it always opens with a double set of entries, or that it adds a new set of entries with each "expand" so that you have an ever-increasing number of child items?

Last point - have we actually solved the element location problem? Do the expanded TreeView entries at least get placed under the correct parent?

M23

Edited by Melba23
Additional queries

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Jewtus
On 7/9/2016 at 4:16 AM, Melba23 said:

How are you expanding/collapsing the drive? Clicking on the associated [+], double-clicking the drive letter (i.e. the TreeView item itself), or a mixture of the two?

I'm clicking the plus sign. 

And when you say "duplicate", do you mean it always opens with a double set of entries, or that it adds a new set of entries with each "expand" so that you have an ever-increasing number of child items?

 

Each time I click the expand, it adds the child items again. I played around with this for a while and it doesn't seem to happen if I click the + slowly, but every time I click twice within a 1-2 second window, the records are duplicated.

Quote

Last point - have we actually solved the element location problem? Do the expanded TreeView entries at least get placed under the correct parent?

The items still fall under the wrong section. When I hit the M drive's + it adds the content to the C, but not until you expand the C drive.

 

Were you able to boot up the VM I sent you via message?

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

×