in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Paint event on mouse move

Last post 02-21-2008 5:02 AM by C1_DaveT. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-18-2008 6:07 PM

    Paint event on mouse move

    I have

    private void c1Chart2D_MouseMove(object sender, MouseEventArgs e)

    {

    int si = 0;

    int pi = 0;

    int dist = 0;

    chart2D.ChartGroups[0].CoordToDataIndex(e.X, e.Y, C1.Win.C1Chart.CoordinateFocusEnum.XandYCoord, ref si, ref pi, ref dist);

    int x = 0;

    int y = 0;

    chart2D.ChartGroups[0].DataIndexToCoord(si, pi, ref x, ref y);

    mouseGraphX = x;

    chart2D.Refresh();

    }

     

    and I also have

     

    private void chart2D_Paint(object sender, PaintEventArgs e)

    {

    e.Graphics.DrawLine(new Pen(Color.Yellow), new Point(mouseGraphX, 0), new Point(mouseGraphX, 300));

    }

     

    now my question is why Refresh() in mousemove doesnt make paint vent to be fired?

    how can i fire paint event from mousemove to draw some custom thinks on my chart?

     

    Best regards.

    Filed under:
  • 02-21-2008 5:02 AM In reply to

    Re: Paint event on mouse move

    Hello,

     

    With regards to the query I would like to inform you that I could not replicate the issue as mentioned. I have sued the same code as mentioned by you and the Paint event does get fired.

    I have tested with the latest release of the control. Therefore I would suggest you to please make sure that you are using the latest build.

    The latest build can be downloaded from the link below:

    http://prerelease.componentone.com/dotnet20/C1Chart/2007-T3/C1Chart.2_2.0.20073.17282.zip

     

    Also you may let me know the version/build of C1Chart you are using so that I can test with the same.

     

    Have a great day.

     

    Regards,

    Dave

    <FireFox78> wrote in message news:202027@10.0.1.98...

    I have

    private void c1Chart2D_MouseMove(object sender, MouseEventArgs e)

    {

    int si = 0;

    int pi = 0;

    int dist = 0;

    chart2D.ChartGroups[0].CoordToDataIndex(e.X, e.Y, C1.Win.C1Chart.CoordinateFocusEnum.XandYCoord, ref si, ref pi, ref dist);

    int x = 0;

    int y = 0;

    chart2D.ChartGroups[0].DataIndexToCoord(si, pi, ref x, ref y);

    mouseGraphX = x;

    chart2D.Refresh();

    }

     

    and I also have

     

    private void chart2D_Paint(object sender, PaintEventArgs e)

    {

    e.Graphics.DrawLine(new Pen(Color.Yellow), new Point(mouseGraphX, 0), new Point(mouseGraphX, 300));

    }

     

    now my question is why Refresh() in mousemove doesnt make paint vent to be fired?

    how can i fire paint event from mousemove to draw some custom thinks on my chart?

     

    Best regards.



    http://helpcentral.componentone.com/cs/forums/p/74355/202027.aspx#202027

Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.