Hello i am designing a graph that displays a line graph from open file I have got it all working so this isnt the problem, The problem is i want checkboxes to be able to add the line if the check box is checked or to remove the line if the check box is unchecked, i want the graph to refresh on changing the state of the check box to add/remove the line accordingly. I am having trouble with the checkbox and the graph refreshing
if (LCheck.Checked)
{
LineItem line1 = myPane.AddCurve("LINE1",
LL, Color.Red, SymbolType.None);
zgc.AxisChange();
zgc.Invalidate();
zgc.Refresh();
}
else if (!LCheck.Checked)
{
LL.Clear();
zgc.AxisChange();
zgc.Invalidate();
zgc.Refresh();
}
Is this the way to do it or is there a better way?
Aucun commentaire:
Enregistrer un commentaire