FAQ & 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

Changing item captions

Question / Problem

I want to change the caption of items, how can this be done?

Answer / Solution

Depending on what you try to do, there are several options:

  • Using the FileNameFormat property to control whether file extensions are generally displayed or not
  • Using the "OnAddItem" event to further modify the caption. The only restriction here is, that you cannot set the caption to an empty string.

    Example:

    procedure TMainForm.ShellListAddItem(Item: TJamShellListItem;
      var CanAdd: Boolean);
    begin
      if not Item.IsFolder and not String.IsNullOrEmpty(Item.AbsoluteItemIdList.Name) then
        Item.Caption := Item.AbsoluteItemIdList.Name;
    end;