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

TShellCommand

Question / Problem

What commands can I execute using the InvokeCommandOnSelected method in the TJamShellTree or TJamShellList?

How do I pass the value?

Answer / Solution

Different classes offer methods to execute commands (e.g. InvokeCommandOnSelected, or InvokeCommand.

Formally, these method usually require a TShellCommand as parameter.

However, this type can be assigned a string or a TShellAction, so both

ShellList.InvokeCommandOnSelected('properties')

as well as

ShellList.InvokeCommandOnSelected(saProperties)

will display the property dialog for the selected elements.

TShellAction is an enumeration of frequently used commands. For less common context menu items, you can pass the verb as string.

Tip:

To find out the verb of an existing context menu item, implement the OnBeforeShellCommand event - it passes the verb of the selected menu item.