Okay, I have a problem with using a popup menu on a TGraph. There's been similar topics, but not quite the same.
So I have a graph with default panning and zooming functionality, and I'm content with it. The problem is the following: I want to have a popup menu on rightclick, but it shows up not only on righclick, but also after right-click pan finishes, which is mildly annoying.
I tried to workaround this bu disabling Autopopup and doing it manually, however Graph.OnClick does not understand right-clicks. Then I tried OnMouseDown and OnMouseUp, but for some reason they only react to double-clicks. (Because of built-in tools?)
Then I tried TPopupMenu.OnPopup with TGraph.ExtentChanged. I thought I'd TPopupMenu.Close the popup immediately if the extent did indeed change, but that doesn't work since the popup menu doesn't open until after OnPopup. Also I'm pretty sure Close doesn't do anything.
If anyone has a neat solution for this, I would really appreciate it. Otherwise, I might try to do something with a toolset, but really I don't think this should be necessary for such a minor problem. IMO the default behaviour should be to not show the Popup menu after panning the graph, especially since panning is enabled by default.