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.

Change icon of file type

Frage / Problem

How do I change the icon of a specific file type in the JamShellList?

Antwort / Lösung

If the new icon is also part of the system image list, then this can be easily achieved using the OnGetImageIndex event of the JamShellList. You can get the full name and path of a specific item in the list using the GetFullPath method.
To get the index of a specific file type icon, you can use the GetIndexFromExtension method of the TJamSystemImageList component.

Since the system image list is a global resource that is shared among all applications it cannot be changed easily. To add your custom icon to this image list you must register a file extension (a dummy one if necessary) with your icon in the system. This is done via the registry and you can use a helper method in ShellBrowser for the registration of the icon.

Note: Many installation builders can register icons for a specific file extension, e.g. InnoSetup