Sorry to be a nuisance but none of my help files are helpful.
On my chart I have a vertical teecursor following mouse no problem.
If cursor is on and user left-clicks, I want to drop a stationary line at the current xval of the cursor. Is this easy to do?
I see I may be able to simply add yet another vertical cursor that doesn't follow mouse, but how do I determine tool(0) xval on a click event?
Thanks again...
Ross
Drawing on Canvas
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ross,
You can draw directly to the chart canvas. The OnMouseDown event already gives you X and Y values:
You can also determine tool's X and Y values using the OnCursorToolChange event.
You can draw directly to the chart canvas. The OnMouseDown event already gives you X and Y values:
Code: Select all
Private Sub TChart1_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
With TChart1
.Canvas.MoveTo X, .Axis.Top.Position
.Canvas.LineTo X, .Axis.Bottom.Position
End With
End Sub
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 |