Zoom and MarksTip
Zoom and MarksTip
I don't undestand what happens in this example:
http://193.145.251.126/pnp/files/ZWgpDy ... chart3.zip
If you open it, you do zoom, and push button3 all is right. But if you uncomment in button3 the code which add the tool tip, when you press button3 the zoom changes.
Why the tooltip affectes the zoom?
Thanks
http://193.145.251.126/pnp/files/ZWgpDy ... chart3.zip
If you open it, you do zoom, and push button3 all is right. But if you uncomment in button3 the code which add the tool tip, when you press button3 the zoom changes.
Why the tooltip affectes the zoom?
Thanks
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Zoom and MarksTip
Because changing it's Style property causes a TChart invalidate. Try:wakeup wrote:Why the tooltip affectes the zoom?
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
tChart1.Aspect.View3D = false;
tChart1.Series[0].FillSampleValues();
tChart1.Zoomed += tChart1_Zoomed;
tChart1.UndoneZoom += tChart1_UndoneZoom;
}
void tChart1_Zoomed(object sender, EventArgs e)
{
tChart1.AutoRepaint = false;
}
void tChart1_UndoneZoom(object sender, EventArgs e)
{
tChart1.AutoRepaint = true;
}
Best Regards,
Christopher Ireland / 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: Zoom and MarksTip
Solved. Thanks a lot!
Re: Zoom and MarksTip
I have detected, after do this change I cannot do two zooms, only the first run....
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Zoom and MarksTip
Try:wakeup wrote:I have detected, after do this change I cannot do two zooms, only the first run....
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
tChart1.Aspect.View3D = false;
tChart1.Series[0].FillSampleValues();
tChart1.Zoomed += tChart1_Zoomed;
tChart1.UndoneZoom += tChart1_UndoneZoom;
tChart1.MouseDown += tChart1_MouseDown;
}
void tChart1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == tChart1.Zoom.MouseButton)
{
tChart1.AutoRepaint = true;
}
}
Best Regards,
Christopher Ireland / 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: Zoom and MarksTip
Thanks, it runs, but are not all these issues bugs?
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Zoom and MarksTip
No, they are not bugs, as this functionality is by design. Changing the value of the properties of TeeChart objects causes TeeChart to repaint itself, and on repainting the Zoom is reset. There is a way to keep track of Zoom movements, in fact, which is to use the Zoom.History property as can be seen in:wakeup wrote:Thanks, it runs, but are not all these issues bugs?
All Features -> Welcome !\Miscellaneous\Zoom and Scroll\Pen and Brush
%Program Files%\Steema Software\Steema TeeChart for .NET 2014 4.1.2014.02240\Examples\DemoProject\bin\ExecutableDemo\TeeChartNetExamples.exe
Best Regards,
Christopher Ireland / 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: Zoom and MarksTip
With the last teechart version the problem is again here, and the autorepaint trick doesn't run.Christopher wrote:Because changing it's Style property causes a TChart invalidate. Try:wakeup wrote:Why the tooltip affectes the zoom?
Code: Select all
private void Form1_Load(object sender, EventArgs e) { tChart1.Aspect.View3D = false; tChart1.Series[0].FillSampleValues(); tChart1.Zoomed += tChart1_Zoomed; tChart1.UndoneZoom += tChart1_UndoneZoom; } void tChart1_Zoomed(object sender, EventArgs e) { tChart1.AutoRepaint = false; } void tChart1_UndoneZoom(object sender, EventArgs e) { tChart1.AutoRepaint = true; }
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Zoom and MarksTip
Here is a video of the autorepaint trick working perfectly with the latest TeeChart version.wakeup wrote:With the last teechart version the problem is again here, and the autorepaint trick doesn't run.
Best Regards,
Christopher Ireland / 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 |