I am trying to reprogram some basic capabilities of an old VB6 program.
I have not been able to find the .NET equivalent of this routine concerning mouse coordinates on a datetime formatted axis.
Can you help me to find it?. Thanks in advance
Private Sub TChart1_OnDblClick()
tmp = 0
TChart1.ToolTipText = ""
tmp = TChart1.Series(3).GetMousePoint
If tmp > -1 Then
xscr = TChart1.Series(3).CalcXPos(tmp)
xv = Format(TChart1.Series(3).XScreenToValue(xscr), "dd/mm/yyyy")
Text1.Text = xv
End If
End Sub
Mouse position
Re: Mouse position
Hello Yacu,
I think you can do something as next code:
Could you tell us, if previous code works as you expected?
I hope will helps.
Thanks,
I think you can do something as next code:
Code: Select all
Steema.TeeChart.Styles.Bar series1;
private void InitializeChart()
{
series1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
series1.XValues.DateTime = true;
series1.FillSampleValues();
tChart1.MouseDoubleClick += new MouseEventHandler(tChart1_MouseDoubleClick);
}
void tChart1_MouseDoubleClick(object sender, MouseEventArgs e)
{
textBox1.Text= DateTime.FromOADate(series1.XScreenToValue(e.X)).ToShortDateString();
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Mouse position
Thanks, Sandra, it works perfectly.
By the way, I'm encountering this type of problem (using new .NET commands and finding the .NET equivalents of VB6 code) almost everyday and I spend too much time finding simple solutions. I wonder if there is a more complete documentation on the class properties and events other than the chm files and the VB sample you pack with the control. Please let me know
Thank you in advance
By the way, I'm encountering this type of problem (using new .NET commands and finding the .NET equivalents of VB6 code) almost everyday and I spend too much time finding simple solutions. I wonder if there is a more complete documentation on the class properties and events other than the chm files and the VB sample you pack with the control. Please let me know
Thank you in advance
Re: Mouse position
Hello Yacu,
I recommend you take a look in:
- TeeChart for .Net Help files.
- TeeChart for .Net Tutorials
- Demo project.
In this files you can find more information of methods, Events and completed examples of Teechart for .Net
I hope will helps.
I recommend you take a look in:
- TeeChart for .Net Help files.
- TeeChart for .Net Tutorials
- Demo project.
In this files you can find more information of methods, Events and completed examples of Teechart for .Net
I hope will helps.
Best Regards,
Sandra Pazos / 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 |