ShellBrowser Delphi Components
Hello and welcome to our Knowledge Base. Our experts provide answers to the most frequently asked questions of our customers. Start your information search here to find your answer quickly and easily.
Please enter your query or select one of the above categories.
All entries (Page 4 / 5)
I want to get the file extension although it`s hidden in the Windows Explorer, but the function ShellBrowser.GetShellObjectName returns the file name without caption. How can I retrieve the complete filename including the extension?
This is the intended behavior of the ShellBrowser.GetShellObjectName method. To get a file system name please use the ShellBrowser.ObjectName property.
How can I get a list of all checked items in a JamShellTreeList?
If you want to iterate over the list of all selected items, you can use the method FindNext() of the JamSelectionList, e.g.:
This returns the names of the selected files and folders. When all items have been enumerated, an empty string will be returned.
If you want to get a list of the selected items, you can use the Paths property of the JamSelectionList.
Is there a way to set the TJamShell controls to prevent the user from executing a shell command, e.g. Delete?
You could use the OnBeforeShellCommand event to overwrite the Windows Shell 's default behaviour and set the var parameter AllowExecute to False in such a case.
I wish to expand every node down to it's lowest level in JamShellTree. I am using the FullExpand method but this is only expanding down one level at a time. Is there a better way?
TTreeNode.Expand(True) should do this job, e.g.:
It appears the TJamShellTree.IsMovePossible() function no longer works after changing the RootedAt property.
The history is cleared if you root a JamShellTree at a different folder. The reason is that you usually have an entire different branch of the shell namespace available in the tree control and can't simply move back to the old folders as they are most likely no longer part if the display branch.
How can I highlight one specific item in the TJamFileListlist?
To select item after adding it, you can use:
JamFileList1.Add( 'C:\ctapi_out_gr.txt ').Selected := True;
If you just want to highlight items in a custom way, you could use the CustomDraw events that the TJamFileList inherited from Delphi 's TListView.
I got errors saying that the .dcu files of ShellBrowser units could not be located. I tried re-installing the package, but I`m still getting errors. What is wrong and how do I fix it?
If Delphi says that DCU files are missing, please check if the appropriate .PAS or .DCU are on your disk. If so, please check in the Delphi Options if these paths are included in the Library Paths.
If you verified that both is conditions are true, then there is most likely a problem with your Delphi installation.
What is the syntax for renaming a file with JamFileOperation?
Where does the new file name go?
What is to do if you want to copy a file to the same folder and rename it at the same time?
To rename a file, you can use code like this:
JamFileOperation.Destination := 'C:\Temp\Windows.zip ';
This code will rename C:\Temp\Shell.zip to C:\Temp\Windows.zip.
To rename multiple files, you have to execute this code in a loop.
Is there a function to retrieve a list of valid drives in ShellBrowser?
What we have is the JamDriveList control. a listview with all valid drives in it.
What you could also do is to set TShellBrowser.SpecialFolder property to SF_DRIVES and then use the TShellBrowser.Next() to enumerate "My Computer":
ShellBrowser.SpecialFolder := SF_DRIVES;
While ShellBrowser.Next do
if Pos( ': ', ShellBrowser.ObjectName) > 0 then
I have a little problem, trying to use the TShellChangeNotification in a service application: The OnChange event isn 't triggered in this situation
The SHChangeNotifyRegister API of Windows doesn't seem to work in a Windows System Service. Although Microsoft's documentation doesn't state this, we found several postings in the internet that suggest that this API doesn't work for service applications.
I want to drag and drop (copy) by default (not move). Do you have a routine that does this?
Setting the property CopyMode to cmCopy should do this job.
Is it possible to change specific file or folder properties such as Comments or Company Name?
No, this is not possible with the ShellBrowser Components.