Skip to content

ScottPlot5.0 Interaction Events #3734

Answered by KennyTK
KennyTK asked this question in Questions
Discussion options

You must be logged in to vote
public void CustomContextMenu(IPlotControl control, Pixel position)
{
	ContextMenuStrip customMenu = new ContextMenuStrip();
	customMenu.Items.Add(new ToolStripMenuItem("Add Sine Wave"));
	customMenu.Items.Add(new ToolStripMenuItem("Clear Plot"));
	customMenu.Show(formsplot1, (int) position.X, (int) position.Y);
}

private void ConfigActions()
{
PlotActions customActions = PlotActions.Standard();
customActions.ShowContextMenu = CustomContextMenu;
formsplot1.Interaction.Enable(customActions);
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@swharden
Comment options

Answer selected by KennyTK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants