Setting cursor positions / Obatining cursor positions?

TeeChart for ActiveX, COM and ASP
Post Reply
jacques
Newbie
Newbie
Posts: 30
Joined: Thu Nov 20, 2008 12:00 am
Location: South Africa
Contact:

Setting cursor positions / Obatining cursor positions?

Post by jacques » Thu Dec 11, 2008 8:09 am

I am currently using Visual studios C++ component.

Could you please advise me on how to do the following with regards the tcCursor tool:

Set the position of the cursor dynamically from within the code.
Read the position of the cursor?

Regards
Jacques Bekker

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Dec 11, 2008 8:55 am

Hi Jacques,

Yes, you can set values like this:

Code: Select all

	m_Chart1.GetTools().GetItems(0).GetAsTeeCursor().SetXVal(xVal);
	m_Chart1.GetTools().GetItems(0).GetAsTeeCursor().SetYVal(yVal);
And get them like this:

Code: Select all

	xVal = m_Chart1.GetTools().GetItems(0).GetAsTeeCursor().GetXVal();
	yVal = m_Chart1.GetTools().GetItems(0).GetAsTeeCursor().GetYVal();
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply