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;