User (Legacy) Posted January 25, 2005 Report Share Posted January 25, 2005 Hi, Is there a way to remove some of the chart types from the chart type context menu? I am talking about the small "chart matrix" selection menu when you right click on a series of a chart. Thanks. - Hai Link to comment Share on other sites More sharing options...
Software FX Posted January 27, 2005 Report Share Posted January 27, 2005 Yes. The Gallery is a command that has sub-commands inside (each gallery), these can be removed using the Commands API. For example: chart1.Commands[(int) CommandID.Gallery].RemoveSubCommand(2); Will remove the third gallery (Area). -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 27, 2005 Author Report Share Posted January 27, 2005 OK, how do I find out which command id coorespond to which gallery? In your example, "2" corresponds to "Area". Is there a lookup table somewhere? Thanks. "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:SVGws%23IBFHA.2412@webserver3.softwarefx.com... > Yes. > > The Gallery is a command that has sub-commands inside (each gallery), > these > can be removed using the Commands API. > > For example: > > chart1.Commands[(int) CommandID.Gallery].RemoveSubCommand(2); > > > > Will remove the third gallery (Area). > > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted January 28, 2005 Report Share Posted January 28, 2005 In the order in which they appear from left to right and then down to the next line, like the natural flow of (western) text. To make your code work regardless of future changes in this order you can do: int index = chart1.Commands[(int) CommandID.Gallery].FindSubCommandID((int) CommandID.Area); if (index >= 0) chart1.Commands[(int) CommandID.Gallery].RemoveSubCommand(index); -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 28, 2005 Author Report Share Posted January 28, 2005 thanks. - harry "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:GvdJzHVBFHA.2412@webserver3.softwarefx.com... > In the order in which they appear from left to right and then down to the > next line, like the natural flow of (western) text. > > To make your code work regardless of future changes in this order you can > do: > > > int index = chart1.Commands[(int) > CommandID.Gallery].FindSubCommandID((int) > CommandID.Area); > > if (index >= 0) > > chart1.Commands[(int) CommandID.Gallery].RemoveSubCommand(index); > > > > > > -- > 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.