FAQ & Knowledge Base

Herzlich Willkommen in unserer Wissensdatenbank. Nutzen Sie die Suchfunktion oder durchstöbern Sie unsere Kategorien, um Antworten auf Ihre Fragen zu erhalten.

Kategorien: ShellBrowser Delphi Components | Alle Kategorien anzeigen

Die folgenden Inhalte sind leider nicht auf Deutsch verfügbar.

Changing item captions

Frage / Problem

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

Antwort / Lösung

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;