We were trying to use a right mouse click to display a popup menu. Our first attempt was done by:
1) In OnMouseDown, remember the X and Y coordinates.
2) In OnMouseUp, check that the mouse hasn't moved (as it would for zoom/scroll/etc), check that the button is the right button, if so, popup the menu.
This was OK, except it appears that there is a huge delay (a few seconds) between the OnMouseDown and the OnMouseUp events when the right button is clicked. This isn't always the case, and having created a new blank project to try and find the source of the problem, it appears that the more nested in panels and page controls etc the chart is, the longer the delay between the mousedown and the mouseup.
Oddly, this delay only exists for the right mouse button, there is no delay for the right mouse button.
I then tried a second approach, which was to set the PopupMenu property thing to point to my popup menu, except this appears all the time, as in if I scroll it'll scroll and then popup the menu.
I was wondering whether there was a) any reason for the large delay between OnMouseDown and OnMouseUp for heavily nested TCharts, b) whether there was a way to do this with the PopupMenu property, so that it only pops up if I haven't scrolled.
Regards
Right Mouse Click
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi jhhd,
You could try disabling the PopupMenu or set it to null in the OnZoom, OnUndoZoom and OnScroll events and assign it again, maybe in chart's OnAfterDraw event.
You could try disabling the PopupMenu or set it to null in the OnZoom, OnUndoZoom and OnScroll events and assign it again, maybe in chart's OnAfterDraw event.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |