Jump to content
Software FX Community

Context menus for legend and titles?


Recommended Posts


 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.


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


  End If

  End If

Link to comment
Share on other sites

The legend box shares the context menu with the data grid. To add an item to it do:


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...