MainBar 是过时的活动报表

MainBar is Obsolete Active Reports

我在 ActiveReports 7.0 版 中工作,在其中自定义 ToolBar 时收到警告。

//代码

ReportViewer.Toolbar.MainBar.Items.RemoveAt(2);

警告:

GrapeCity.ActiveReports.Viewer.Win.Viewer.ViewerToolbar.MainBar' is obsolete: Use ToolStrip property instead

我应该在哪里使用 ToolStrip 属性?请帮助

感谢您使用ActiveReports

这里是viewer customization主题 和工具栏项目列表 here

Toolstrip 是 viewer toolbar

的成员

要访问它,请使用 viewer1.Toolbar.Toolstrip,它 returns 一个标准的 windows 表单 Toolstrip 实例。

希望对您有所帮助。