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

TdxCustomSpreadSheet.OnPageControlContextPopup Event

In This Article

Enables you to customize, disable, or replace the built-in popup menu invoked within the caption bar area.

#Declaration

Delphi
property OnPageControlContextPopup: TdxSpreadSheetPageControlContextPopupEvent read; write;

#Remarks

This event occurs every time the caption bar popup menu is about to appear. You can assign True to the AHandled parameter within an OnPageControlContextPopup event handler to forbid a user to invoke the built-in popup menu or replace it with a custom menu.

procedure TMyForm.dxSpreadSheet1PageControlContextPopup(ASpreadSheet: TdxCustomSpreadSheet; const P: TPoint; APopupMenu: TPopupMenu; var AHandled: Boolean);
begin
  MyPopupMenu.Popup(P.X, P.Y);  // Invokes the custom popup menu at the mouse pointer position
  AHandled := True;  // Disables the built-in popup menu
end;

Refer to the TdxSpreadSheetPageControlContextPopupEvent procedural type description for detailed information on all parameters accessible within an OnPageControlContextPopup event handler.

See Also