开发者

ZedGraph on resize?

How can I access the event that is triggered when a graph pane is resized?

After each resize, I want开发者_如何学JAVA to fix the text size on the title and labels so they don't get huge when the window is maximized.


You can subscribe for ZedGraphControl's resize event:

zg1.Resize += new EventHandler(zg1_Resize);

But it's easier to achieve what you want by disabling the automatic font scaling on the GraphPane:

zg1.MasterPane[0].IsFontScaled = false;

If you have more than one GraphPane on your MasterPane, use:

 foreach(GraphPane pane in zg1.MasterPane.PaneList)
    pane.IsFontScaled = false;

See also:
http://zedgraph.org/wiki/index.php?title=How_does_the_font_and_chart_element_scaling_logic_work%3F http://zedgraph.sourceforge.net/documentation/html/P_ZedGraph_PaneBase_IsFontsScaled.htm

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜