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.

Knowledge Base ShellBrowser Delphi Components

status_loader


To use the search function, you need JavaScript enabled.

All entries (Page 1 / 5)
Is there a version of ShellBrowser components that support RAD Studio 10.4 Sydney?

We are urgently working towards finishing ShellBrowser 11.2 that will support the new RAD Studio version.

A prerelease version will be available beginning of week 22, please get in contact with ShellBrowser support to receive a link.

Previews of a certain file type are not displayed correctly. What's wrong?

ShellBrowser uses registered preview handler shell extensions for the FilePreview component. Some of these extensions belong to Windows, others are installed with third party applications.

If the FilePreview is not working, please check the following list:

  • Does Windows Explorer preview the files correctly? If no, there is either no preview handler installed, or it is not working correctly. Try updating the respective program. 
  • If the problem occurs in a x86 application, please try compiling a 64-bit version.  
  • The FilePreview component works asynchronously. Depending on the context (versions of Windows, Rad Studio and the PreviewHandler, but also the layout of the form containing the Preview) some Preview Handler may not work or show visual glitches.
     
    Try forcing the loading of the preview into the main thread, by implementing the OnLoadPreview event of the Preview. 
  • If all of this fails, don't hesitate to contact the support. In this case, please provide details on the error: versions of Windows, the IDE and the program that provides the PreviewHandler.

How can I programmatically select a node in the TJamShellTree?

To set a different selection in the ShellTree, there are the following possibilities:

ShellTree.SelectedFolder := ‘c:\’;

ShellTree.SpecialFolder := Jam.Shell.Types.SF_DOWNLOADS;

Can I use ShellBrowser to add a custom context menu entry or add other functionality to Windows Explorer?

Unfortunately this is beyond the scope of ShellBrowser components. You have to write a "shortcut menu handler" or other type of shell extension to do so.

See the Microsoft documentation for an overview.

In my application I want to restrict the access to only some folders or a single branch of the file system. How can achieve this?

There are several measures you can take, depending on the components you are using:

In the TJamShellTree, you can set the root nodes via the MultipleRoots and RootedAt properties. RootedAt is also available for the BreadCrumbBar.

To avoid, that a user manually opens a folder you have different options of interception:

What is the difference between the TJamShellList and TJamExplorerBrowser?

When configuring TJamExplorerBrowser to only include the FolderView, it looks much like the TJamShellList.

TJamExplorerBrowser wraps a Windows system component, and thus it will look exactly like Windows File Explorer.The TJamShellList on the other hand derives a VCL ListView control, that tries to resemble Windows File Explorer as much as possible. While it misses some aspects of this, it can on the other hand be customized more widely visually and functionally.

Does the ShellBrowser Delphi Edition contain a control to preview files?

Yes, it contains the TJamFilePreview control.

I can drag files from JamExplorer to the Windows Explorer, but not the other way round. What is going wrong?

Privileged processes do not receive Drag&Drop from non-privileged processes for security reasons. This could be the case if you start your IDE or your executable as admin.

How can I order ShellBrowser Delphi Edition and how will it be delivered?

You may order online at www.jam-software.com

For further questions, please have a look at the Shop FAQ:
www.jam-software.de/knowledgebase/customers/

How can I expand nodes like SF_FAVORITES or SF_LIBRARIES in the JamShellTree?

To expand these nodes, you may use code like this:

procedure TMainForm.FormShow(Sender: TObject);
var
    i:Integer;
begin
    i := 0;
    while (i < ShellTree.Items.Count) do
    begin
        if (ShellTree.Items[i].AbsoluteItemIdList.SpecialFolder in [SF_FAVORITES, SF_LIBRARIES]) then
            ShellTree.Items[i].Expand(False);
        Inc(i);
    end;
end;

How can I forbid entering a specific folder in a JamShellTree and JamShellList?

You can use the TJamShellTree.OnChanging event like this:
uses ShellBrowser;
const
    forbiddenPath: String = 'C:\Windows';
procedure TMainForm.ShellTreeChanging(Sender: TObject; Node: TTreeNode; var AllowChange: Boolean);
var
    shellNode: TJamShellTreeNode;
begin
    shellNode := node as TJamShellTreeNode;
    if (ShellBrowser.SamePath(shellNode.FullPath, forbiddenPath)) then
        AllowChange := false;
end; 

To achieve the same result in the JamShellList, use the TJamShellList.PathChanged event:
uses ShellBrowser;

private
    lastPath: String;
const
    forbiddenPath: String = 'C:\Windows';

procedure TMainForm.ShellListPathChanged(Sender: TObject);
begin
    if (ShellBrowser.SamePath(ShellList.Path, forbiddenPath)) then
        ShellList.Path := lastPath
    else
        lastPath := ShellList.Path;
end;

You can also use the OnBeforeShellCommand event and use the AllowExecute parameter to prevent the execution. The Command parameter when opening a folder might be "default" or "open".

How can I exclude a drive from the JamShellTree?

You can use the OnAddFolder event with a statement like this:
CanAdd := not (GetDriveType(PChar(Path)) in [DRIVE_REMOVABLE]);

This will exclude the floppy drive. It is also possible to exclude other drives like the CD-ROM (DRIVE_CDROM).