User (Legacy) Posted September 28, 2004 Report Share Posted September 28, 2004 We Link to comment Share on other sites More sharing options...
Software FX Posted September 29, 2004 Report Share Posted September 29, 2004 Ok. To disable the Gallery from all menus, toolbars and dialogs simply do: chart1.Style &= ~ChartStyle.Gallery; You can remove the gallery command from the toolbar and from the context menu by doing: chart1.ToolBarObj.RemoveAt(6); // Remove from toolbar chart1.Commands[(int)CommandID.ContextMenuBack].RemoveSubCommand(4); // Remove from context menu if you have a customizable toolbar and menus, instead of using fixed indexes (6 and 4) you can loop through the toolbar and menu until you find CommandID.Gallery. You code: Chart1.Commands[(int)CommandID.Gallery].Enabled = false; Doesn't work becuase built-in commands are enabled/disabled automatically depending on context and certain conditions. As for the exception, what I need is that you export the chart to a binary file (using the Export method) right BEFORE you switch galleries (and get the exception) and post it here. -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.