Page 1 of 1

Setting cursor positions / Obatining cursor positions?

Posted: Thu Dec 11, 2008 8:09 am
by 15050891
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

Posted: Thu Dec 11, 2008 8:55 am
by narcis
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();