Jump to content
Software FX Community

Add Print command to Context Menu


Mike O'Neal

Recommended Posts

I need to add the Print Preview command to the default context menu on a chart.

I can add it to the toolbar and it works fine, and I can find the menu bar, but I can't find the context menu. Is there a way to reference the default context menu and make adjustments to it?

Link to comment
Share on other sites

Yes, the Context Menu is simply a command than contains Sub-Commands.

 To add your command simply do:

 chart1.Commands[CommandId.ContextMenuBack].SubCommands.Add(CommandId.PrintPreview);

You can also add it at a particular position using Insert instead of Add.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...