清除zedGraphControl的所有内容 [英] clear all the content of zedGraphControl
本文介绍了清除zedGraphControl的所有内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Zedgraph绘制折线图,并尝试清除和删除zedGraphControl的所有内容以便能够使用它来绘制新图.但这是行不通的,并且给出了错误信息:
Hi,
I use Zedgraph to draw line graphs and tried to clear and remove all the contents of zedGraphControl to be able to use it for drawing a new graph.But this is not work and gives and error :
zedGraphControl1 = new zedGraphControl1();
我也看不到任何用于此目的的方法,例如
Also I couldn''t see any method for this purpose like
zedGraphControl1.Clear();
所以我该怎么做?请帮助..
So what should I do? Please help..
推荐答案
在zedGraphControl的内部有GraphPane,因此可以从控件中删除图形,您可以尝试以下操作:
Inside the zedGraphControl there is the GraphPane so to remove graphs from the control you can try this:
zedGraphControl.GraphPane.CurveList.Clear();
问候,
-MRB
Regards,
-MRB
这篇关于清除zedGraphControl的所有内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文