Page 1 of 1

Exiting the Right Click State

Posted: Wed Dec 03, 2008 10:32 am
by 9092401
Hi
We have a feature where when right clicking on a series we enable the user to change the series color using a color selection dialog.
The thing is that sometimes when the Dialog is on the series or the Ok button is on the series or chart , and user changes a series color , after the user presses with the mouse OK and we change the series color, The chart is kept in the Right Button Down state , and the chart scrolls during the mouse move even thought the right button is not down. I cant say why this happens and I cant always reproduce it.
Its as if the chart didnt receive a right button mouse UP and is still in the state where the right button is clicked and when I move the mouse over the chart the chart scrolls automatically.

My question is how can I through code , tell the chart not to be in the right click state. I want to manually reset the chart to make sure this doesnt happen.

THanks.

Posted: Wed Dec 03, 2008 11:39 am
by narcis
Hi qcrnd,

Yes, you can use CancelMouse:

Code: Select all

			tChart1.Chart.CancelMouse = true;
Hope this helps!

Posted: Wed Dec 03, 2008 12:48 pm
by 9092401
Hi Narcis
Thanks . it works.
BTW funny that after we do some work we see that the CancelMouse becomes false. Dont know what it is we do that makes it false..

Posted: Wed Dec 03, 2008 1:51 pm
by narcis
Hi qcrnd,

Yes, MouseDown, MouseUp, MouseMove, MouseWheel events set it to false.