EricTaylor
asked on
base control that has a popupMenu
A function in one of my Delphi 2010 libraries creates a TPopupMenu on the fly. I need to create a procedure that lets me pass a control to associate the menu with. For example, a TEdit has a PopupMenu property, as does a TMemo, a TcxDbTreeList, etc. I obviously don't want to write a separate overloaded procedure for every control type that I'll ever want to associate my menu with, but I can't figure out what base class that lets me set the Popupmenu property. For example, I can't write
if Sender is TWinControl then TWinControl(Sender).popupMenu := myMenu;
because TWinControl doesn't have the PopupMenu property. What class base supports the PopupMenu property?. Ā Thanks much.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER