A project I am working on has a TLMDSimplePanel which needs to have AllowMoving and AllowSizing (with size grip) set to True. It also needs to use a PopupMenu.
I've noticed that if AllowMoving is set to True, then the PopupMenu's AutoPopup feature doesn't seem to work. I've tried various implementations using combinations of OnMouseDown, OnMouseActivate, and OnContextPopup, but none have fully worked properly.
What is the best way to implement having AllowMoving set to True, while also using a PopupMenu on the same panel?
Comments
For one type of panel in the project, it's strongly preferred that any of the visible area of the TLMDSimplePanel accommodate the right-click Popup Menu. How could that be accomplished programmatically? I don't mind manually calling the popup via OnMouseDown or other events, or even (if necessary) inheriting from TLMDSimplePanel and overriding some methods; just struggling with where to reliably intercept things.
Ideally, if not an "automatic" approach (which you've answered above already as not doable), then by some approach which leaves the AllowMoving functionality unscathed, but adds some programmatic implementation to facilitate TPopupMenu integration across the entire panel. Possible? (Surely it must be, somehow..)
Thanks again for your time, and quick response.