Back to Devexpress

TdxCustomSpreadSheet.OnPageControlContextPopup Event

vcl-dxspreadsheetcore-dot-tdxcustomspreadsheet-8ec1ba33.md

latest2.0 KB
Original Source

TdxCustomSpreadSheet.OnPageControlContextPopup Event

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.

delphi
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;
cpp
void __fastcall TMyForm::dxSpreadSheet1PageControlContextPopup(TdxCustomSpreadSheet *ASpreadSheet, const TPoint &P, TPopupMenu *APopupMenu, bool &AHandled)
{
  MyPopupMenu->Popup(P.X, P.Y); // Invokes the custom popup menu at the mouse pointer position
  AHandled = true; // Disables the built-in popup menu
}

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

See Also

TdxCustomSpreadSheet.OnTableViewContextPopup

TdxCustomSpreadSheet Class

TdxCustomSpreadSheet Members

dxSpreadSheetCore Unit