TcxCustomButton.OnDropDownMenuPopup Event
Occurs when the button’s dropdown menu is about to be displayed on screen.
Declaration
property OnDropDownMenuPopup: TcxButtonDropDownMenuPopupEvent read; write;
Remarks
This event is deprecated, and is retained for backward compatibility only. Handle the button’s OnDropDownMenuPopupEx event instead.
The OnDropDownMenuPopup event is fired after the OnDropDownMenuPopupEx event and only if the following conditions are met:
The button’s Kind property is set to cxbkDropDown, cxbkDropDownButton, or cxbkOfficeDropDown;
False is passed as the AHandled parameter of the OnDropDownMenuPopupEx event handler;
nil (or NULL in C++Builder), a TPopupMenu component, or a TPopupMenu descendant is assigned to the DropDownMenu property or passed as the APopupMenu parameter of the OnDropDownMenuPopupEx event handler.
Handling the OnDropDownMenuPopup event is useful, for instance, if you want to handle the dropdown menu appearance in a custom way or designate the popup menu to be displayed at run time. The APopupMenu parameter specifies the popup menu object that will be displayed. By default, it refers to the TPopupMenu instance set to the DropDownMenu property. When the DropDownMenu property is not set, the APopupMenu parameter value is nil (Delphi) or NULL (C++).
Set the AHandled parameter to True (the default value is False) and the dropdown menu will not be displayed automatically.