We don’t use marketing cookies. Functional cookies ensure a smooth performance of our website. If you continue to use our services, you agree to the use of cookies. Data protection at JAM OK

FAQs & Knowledge Base

Welcome to our Knowledge Base. Search or browse through the topics below to find answers to your questions.

Categories: ShellBrowser Delphi Components | Show all categories

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.

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.

ShellBrowser per default uses an alpha-numerical comparison method on the custom column texts of the items, that unfortunately doesn't respect date values.

You can however custom sort the affected columns by implementing the "OnCompare" event, e.g.:

procedure TMainForm.JamShellList1Compare(Sender: TObject; Item1,
  Item2: TListItem; Data: Integer; var Compare: Integer);
var lDate1, ldate2: TDateTime;
begin
  if JamShellList1.Columns[JamShellList1.SortColumn].Caption = 'Custom date column' then begin
    lDate1 := StrToDateTime(Item1.SubItems[JamShellList1.Columns[JamShellList1.SortColumn].SubItemIndex]);
    lDate2 := StrToDateTime(Item2.SubItems[JamShellList1.Columns[JamShellList1.SortColumn].SubItemIndex]);
    Compare := CompareDateTime(lDate1, lDate2);
  end;
end;

Using the TJamShellList you can add custom columns to add custom content.

Please check the project "CustomColumns" in the examples subfolder of the installation directory for more information.

The issue with selecting the element by typing is, that it will only work for elements that have a caption. For performance reasons in the ShellList, loading the caption only occurs when the item is scrolled into view.

However you can force loading the caption sooner by implementing the "OnAddItem" event:

procedure TMainForm.ShellListAddItem(Item: TJamShellListItem;  
var CanAdd: Boolean);
begin  
  Item.Caption := Item.Caption;
end;

In this case the Item.Caption will be assigned when the item is added, so that the incremental search will subsequently work.

Another option to find an item manually, is to use the features that our controls inherited from the TListView control:

var Item := ShellList.FindCaption(0, 'notepad.exe', False, False);
if Assigned(Item) then 
  Item.MakeVisible(False);

If you want to slelect the item, use code like this:

ShellList.SelectedFiles.Add('notepad.exe');