CalsepDK Posted June 4, 2007 Report Share Posted June 4, 2007 Hi I am working on customizing the context menus of a chart. For instance I want to remove the "Edit title" from all context menus. It works fine for ContextMenuBack and ContextMenuAxis, but I haven't been able to locate the context menus for the axis or header title (ContextMenuAxisSection doesn't work). Furthermore, I want to add a new context item when you right click on the legend of a series, but I am also unable to locate this menu. Since it can be a bit tricky locating the menu items, I use the following code to help me. It doesn't report anything on the EditTitle, but the menu is still available when right clicking a title... Any help is appreciated. For Each cmd As Command In Me.Commands If (Not cmd.SubCommands Is Nothing AndAlso cmd.SubCommands.Count > 0) Then If (cmd.SubCommands.IndexOf(CommandId.EditTitle) > 0) Then Diagnostics.Debug.Print(cmd.Text) End If End If Next Link to comment Share on other sites More sharing options...
Frank Posted June 11, 2007 Report Share Posted June 11, 2007 The legend box shares the context menu with the data grid. To add an item to it do: Chart1.Commands(ChartFX.WinForms.CommandId.ContextMenuTool).SubCommands.Add(CommandID.Show3D) I don't understand which menu you mean by "context menus for the axis or header title". The title is ContextMenuTitle and the Axis is ContextMenuAxis. If you are talking about the default menu that appears when you right-click the chart's background, this one is ContextMenuBack. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.