Right Mouse Button Down problems
Right Mouse Button Down problems
In my chart , I have zoom in and out and Scroll functionality by playing with
MaxPointsPerPage and Using Page.Next Page.Previous.
I have a defect that , after user uses Right Mouse Button to scroll the chart , then the Page.Next and Page.Previous and the MaxPointsPerPage stop working untill I call Zoom.Undo()
Question:
1. Do you have a fix for this.
2. If not , how do I disable the right mouse down scrolling functionality.
Thanks
MaxPointsPerPage and Using Page.Next Page.Previous.
I have a defect that , after user uses Right Mouse Button to scroll the chart , then the Page.Next and Page.Previous and the MaxPointsPerPage stop working untill I call Zoom.Undo()
Question:
1. Do you have a fix for this.
2. If not , how do I disable the right mouse down scrolling functionality.
Thanks
Re: Right Mouse Button Down problems
Hello rino,
A solution for paging WITH zooming and scrolling would be to use axis SetMinMax method to perform "paging". Something like this :
Where currentmin defines current minimum and range number or range of points you want to display. Using this approach you can control "page" via the currentmin and number of points per page via the range variable.
Could you tell us, if previous code solve your problem and works are you expected?
I hope will helps.
Thanks,
A solution for paging WITH zooming and scrolling would be to use axis SetMinMax method to perform "paging". Something like this :
Code: Select all
Steema.TeeChart.Styles.Line series1, series2;
double currentmin;
private void InitializeChart()
{
//Chart
tChart1.Dock = DockStyle.Fill;
this.tChart1.Aspect.View3D = false;
this.tChart1.Axes.Bottom.MinorTicks.Visible = false;
tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
//Series
series1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
series2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
tChart1.Panel.MarginRight = 10;
series1.FillSampleValues(30);
series2.FillSampleValues(30);
tChart1.Page.MaxPointsPerPage = 10;
currentmin = tChart1.Axes.Bottom.Minimum;
tChart1.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum, tChart1.Axes.Bottom.Minimum + 10);
tChart1.UndoneZoom += new EventHandler(tChart1_UndoneZoom);
}
void tChart1_UndoneZoom(object sender, EventArgs e)
{
tChart1.Axes.Bottom.SetMinMax(currentmin, currentmin + 10);
}
private void button1_Click(object sender, EventArgs e)
{
tChart1.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum+10,tChart1.Axes.Bottom.Minimum+2.0*10);
tChart1.Page.Next();
}
private void button2_Click(object sender, EventArgs e)
{
tChart1.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum-10, tChart1.Axes.Bottom.Minimum);
tChart1.Page.Previous();
}
Could you tell us, if previous code solve your problem and works are you expected?
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: Right Mouse Button Down problems
Hi Sandra
Actually I do not have a problem with the zoom or page scroll .
The problem starts only after pressing right button down and dragging. After that the zoom and previous next do not work.
is there a way to cancel the right button down functionality.
Thanks.
Actually I do not have a problem with the zoom or page scroll .
The problem starts only after pressing right button down and dragging. After that the zoom and previous next do not work.
is there a way to cancel the right button down functionality.
Thanks.
Re: Right Mouse Button Down problems
Hello rino,
Could you reproduce your problem using previous code? If you can reproduce the problem with previous code, please explain us step-to-step how we have to do to reproduce these here.
Thanks,
Could you reproduce your problem using previous code? If you can reproduce the problem with previous code, please explain us step-to-step how we have to do to reproduce these here.
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: Right Mouse Button Down problems
Hi Sandra
Again I ask , is there anyway to disable the right mouse down functionality.?
I do not want to refactor our zoom and previous , which works .
Thanks
Again I ask , is there anyway to disable the right mouse down functionality.?
I do not want to refactor our zoom and previous , which works .
Thanks
Re: Right Mouse Button Down problems
Hello rino,
Sorry, I think that I didn't understand your previous post correctly. I have made a simple code, where is disabled the scroll functionality that you do with button right of mouse, in mouse down event:
Could you please, tell us if previous code disabling the scroll your application works as you expected?
Thanks,
Sorry, I think that I didn't understand your previous post correctly. I have made a simple code, where is disabled the scroll functionality that you do with button right of mouse, in mouse down event:
Code: Select all
Steema.TeeChart.Styles.Line series1, series2;
double currentmin;
private void InitializeChart()
{
//Chart
tChart1.Dock = DockStyle.Fill;
this.tChart1.Aspect.View3D = false;
this.tChart1.Axes.Bottom.MinorTicks.Visible = false;
tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
//Series
series1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
series2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
tChart1.Panel.MarginRight = 10;
series1.FillSampleValues(30);
series2.FillSampleValues(30);
tChart1.Page.MaxPointsPerPage = 10;
tChart1.Page.AutoScale = false;
currentmin = tChart1.Axes.Bottom.Minimum;
tChart1.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum, tChart1.Axes.Bottom.Minimum + 10);
tChart1.MouseDown += new MouseEventHandler(tChart1_MouseDown);
tChart1.UndoneZoom += new EventHandler(tChart1_UndoneZoom);
tChart1.Draw();
}
void tChart1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
tChart1.Panning.Allow = Steema.TeeChart.ScrollModes.None;
}
}
void tChart1_UndoneZoom(object sender, EventArgs e)
{
tChart1.Axes.Bottom.SetMinMax(currentmin, currentmin + 10);
}
private void button1_Click(object sender, EventArgs e)
{
tChart1.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum + 10, tChart1.Axes.Bottom.Minimum + 2.0 * 10);
tChart1.Page.Next();
}
private void button2_Click(object sender, EventArgs e)
{
tChart1.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum - 10, tChart1.Axes.Bottom.Minimum);
tChart1.Page.Previous();
}
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: Right Mouse Button Down problems
Hi Sandra
can you please explain in detail why you need to combine the SetMinMax with the Chart.Page.Next
shoudlnt Chart.Page.Next be enough ? why must you keep adjusting the min max also ?
thanks.
can you please explain in detail why you need to combine the SetMinMax with the Chart.Page.Next
shoudlnt Chart.Page.Next be enough ? why must you keep adjusting the min max also ?
thanks.
Re: Right Mouse Button Down problems
Hi
What I need is the correct way to implement 5 functionalities , zoom in, zoom out , scroll left page, scroll right page. Zoom out increases by 1 the number of bars shown and Zoom in decreases.
Until now I was using pages but if I understand correctly it is better to work only with the SetMinMax and not with page scrolling .
Is that correct ?
Thanks.
What I need is the correct way to implement 5 functionalities , zoom in, zoom out , scroll left page, scroll right page. Zoom out increases by 1 the number of bars shown and Zoom in decreases.
Until now I was using pages but if I understand correctly it is better to work only with the SetMinMax and not with page scrolling .
Is that correct ?
Thanks.
Re: Right Mouse Button Down problems
Hello rino,
I hope will helps.
Thanks,
Ok, I have added it in wish-list with number [TF02015461] to try to inclusion it in future releases. At the moment, you can do something as next code using Zoom.Undo() before to do Page.Next and Page.Previous if you prefer, before use SetMinMax, that also is a other workaround for this problem.What I need is the correct way to implement 5 functionalities , zoom in, zoom out , scroll left page, scroll right page. Zoom out increases by 1 the number of bars shown and Zoom in decreases.
Until now I was using pages but if I understand correctly it is better to work only with the SetMinMax and not with page scrolling .
Is that correct ?
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
tChart1.Zoom.Undo();
tChart1.Page.Next();
}
private void button2_Click(object sender, EventArgs e)
{
tChart1.Zoom.Undo();
tChart1.Page.Previous();
}
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 |