Jump to content
Software FX Community

Context menu for series legend?


User (Legacy)

Recommended Posts

I have added subcommands to the context menu of the background and the 

title, but do not see a

chart1.Commands[(int) CommandID.ContextMenu.SeriesLegend]

or

chart1.Commands[(int) CommandID.ContextMenu.Legend]

Does this mean that in order to change the context menu, I have to create my

own? If so, is there a better way than hooking the right click?

FWIW, the most common command I am adding is "Clear"(delete/remove).

Thanks,

Greg

Link to comment
Share on other sites

All dockable tools (both Legend Boxes and the Data Editor) share the same 

context menu:

CommandID.ContextMenuTool

To add your command do:

chart1.Commands[(int)

CommandID.ContextMenuTool].InsertSubCommands(1,position);

chart1.Commands[(int) CommandID.ContextMenuTool].SubCommandID[position] =

yourCommandID;

--

FP

Software FX

Link to comment
Share on other sites

That should work for me, thanks.

If I wanted to maintain the Data Editor ability (which I probably won't at

first), how would my UserCommand know whether it is processing the Data

Editor or the Legend? Is this where you respond that I need to keep track

of where the right click occurred?

I would not want to "Clear" the Legend Box if the user is attempting to

clear the Data Editor.

Thanks for responding so quickly! (within an hour is excellent service)

-Greg

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:xiK6vlz9EHA.1580@webserver3.softwarefx.com...

> All dockable tools (both Legend Boxes and the Data Editor) share the same

> context menu:

>

> CommandID.ContextMenuTool

>

> To add your command do:

>

> chart1.Commands[(int)

> CommandID.ContextMenuTool].InsertSubCommands(1,position);

> chart1.Commands[(int) CommandID.ContextMenuTool].SubCommandID[position] =

> yourCommandID;

>

> --

> FP

> Software FX

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...