Knowledgebase

status_loader

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;

Need further help getting started?

You did not find what you were looking for? Please contact us so we can provide an answer to your question.

Contact Form