Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomShellListView.OnExecuteItem Event

In This Article

Occurs before the default associated program is launched for the file shell item activated by pressing the Enter key or by double-clicking the mouse.

#Declaration

Delphi
property OnExecuteItem: TcxShellExecuteItemEvent read; write;

#Remarks

The APIDL parameter identifies the shell item being activated by pressing the Enter key or by double-clicking the mouse. To convert the APIDL parameter value to a readable string, use the GetPIDLName function.

Set the AHandled parameter to True, to prevent launching the default associated program for the activated file shell item.

The following code example demonstrates how to prohibit launching the default associated program for .BMP files.

Delphi
procedure TForm1.cxShellListView1ExecuteItem(Sender: TObject;
  APIDL: PItemIDList; var AHandled: Boolean);
begin
  AHandled := Pos('.bmp', GetPIDLDisplayName(APIDL, True)) = Length(GetPIDLDisplayName(APIDL, True)) - 3;
end;

Note

The OnExecuteItem event is fired only when the AutoExecute property is set to True.

See Also