Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have problem whit the chart when i resize other controls, i have a seri with N point added to my chart, then i paint a line
C#
graph.DrawLine(new Pen(Color.Yellow, 1), point3, point4);
when i resize other control o de form this line disapear, then when i zom in the chart appear again. I need to avoid disapear.

SOLUTION: I call post paint with boolean var and repaint the lines.
Posted
Updated 8-Oct-15 21:39pm
v3

1 solution

Apparently, you are doing it wrong. You have to support drawing/redrawing permanently, by doing all rendering in your overridden OnPaint method or Paint handler. For further detail, please see my past answers:
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
How to avoid Red Cross in DatagridView C#[^],
capture the drawing on a panel[^],
Drawing Lines between mdi child forms[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900