[SOLVED] ShellTreeView crashes when going to higher directory. lazarus / 34-Windows ---------------------------------------------------------------------- marsheng · 2022-03-24 00:45 I'm using ShelTreeView to navigate to my files. Once I have fould the file location, I store the address so I can reload the location when I run the program again. for example the directory is M:\Dynamic\_Production\DX-REM41CBackBlock\ I have an up arrow function to back track the directorys so pressing the button will load  M:\Dynamic\_Production\ However, it crashes. If I start with m:\ for example and then go to the sub directories, I can then go back to m:\ without any problems so it seem to memorise where it came from. If I preload it with M:\Dynamic\_Production\DX-REM41CBackBlock\ is then crashes like it dosent know where it came from. . See attached [Edited to remove Linux from the thread title - this is the Windows sub-forum] ---------------------------------------------------------------------- dsiders · 2022-03-24 02:27 Quote from: marsheng on March 24, 2022, 01:45:04 amI'm using ShelTreeView to navigate to my files. Once I have fould the file location, I store the address so I can reload the location when I run the program again. for example the directory is M:\Dynamic\_Production\DX-REM41CBackBlock\ I have an up arrow function to back track the directorys so pressing the button will load  M:\Dynamic\_Production\ However, it crashes. If I start with m:\ for example and then go to the sub directories, I can then go back to m:\ without any problems so it seem to memorise where it came from. If I preload it with M:\Dynamic\_Production\DX-REM41CBackBlock\ is then crashes like it dosent know where it came from. . See attached The answer is in the error message. You've set TShellTreeView.Root to a path and it is the lowest directory in the tree that can be used in navigation. Use the Path property (public - so not visible in the object inspector) to set the initial directory. Leave Root blank unless you really do want to limit navigation to a specific  branch of nodes in the tree. ---------------------------------------------------------------------- marsheng · 2022-03-24 03:12 You are quite correct. Path is not shown in the Object inspector only root. However when I used the autofill (not sure of the name) when programming I did find the path option.  I had a mixture of both hence the problem. Now I only use path, all fine. Thanks ---------------------------------------------------------------------- wp · 2022-03-24 09:20 Just for completeness, I am attaching a demo in which the path to the selected node of the shelltreeview is stored in an ini file and restored when the application runs the next time. ---------------------------------------------------------------------- marsheng · 2022-03-24 10:04 Thanks for the demo. I used an ini file as well. ---------------------------------------------------------------------- marsheng · 2022-03-26 04:33 I new to Linux in therms of programming. I used my windows program in Linux and found a few differences. The mask does not appear to work the same.  ShellListView.Mask:='*.cnc';    depending on where I put it, lists everything or nothing and how do I get my network drives (windows bits) to show up in ShellTreeView ? ---------------------------------------------------------------------- trev · 2022-03-26 06:01 This is the Windows sub-forum. Please start a new topic in the Linux sub -forum. Thread locked.