User (Legacy) Posted January 10, 2005 Report Share Posted January 10, 2005 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 More sharing options...
Software FX Posted January 10, 2005 Report Share Posted January 10, 2005 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 More sharing options...
User (Legacy) Posted January 10, 2005 Author Report Share Posted January 10, 2005 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 More sharing options...
Software FX Posted January 10, 2005 Report Share Posted January 10, 2005 A property in the CommandUIEventArgs (Object) contains the object sending the event, in this case DataEditor or LegendBox. You can use this property to differentiate between these commands. -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.