Holger's Thoughts on Delphi

Saturday, November 26, 2005

PopupMenu Part II

Well, nobody is perfect, I guess. Ryan McGinty just brought up a far shorter solution to the problem, which might be sufficient for the most cases.

Simply use
property PopupComponent: TComponent read FPopupComponent write FPopupComponent; of TPopupMenu.

Thanks Ryan!

1 Comments:

  • No problem! I seem to remember following the exact same line of thinking using the Sender at various points. I don't remember exactly how I stumbled on it, but I do remember that it was NOT the most obvious thing in the world!

    By Anonymous Anonymous, at 7:31 AM  

Post a Comment

<< Home