Hi,
I'm using Teechart pro 7.07 for C++ builder6.
I have a chart with a OnClickBackground event. In this event I would like to get the XValue of my click. The XValue must be the XValue of my bottom axis, at the place of my click, with my scale.
Do you know if it's a way to get that ?
Thanks...
MOS
[SOLVED] How to get XValue in OnClickBackground event ?
[SOLVED] How to get XValue in OnClickBackground event ?
Last edited by Komar on Wed Apr 11, 2007 12:04 pm, edited 1 time in total.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi lp,
Yes, you can do something like this:
Yes, you can do something like this:
Code: Select all
void __fastcall TForm1::Chart1ClickBackground(TCustomChart *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
double XVal = Chart1->Axes->Bottom->CalcPosPoint(X);
Chart1->Title->Text->Add(FloatToStr(XVal));
}
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 |