jmcdaniel Posted August 30, 2007 Report Share Posted August 30, 2007 I have a case where I am emulating the Chart's menu items. I am able to quite easily build them via interrogating the CommandsCollection. What I am having a harder time doing is telling the chart "okay, now execute command BLAH". Or rather saying "execute command BLAH for series X, point Y". Currently I have the following code which works aside from not being able to pass series / point info. It uses internal interfaces which no doubt is not what I should be doing (or have to do). Can anyone think of a way to do this> Cheers, Jesse Command cmd = ... // if the item needs [un]checking, do so... if ((cmd.Style & CommandStyles.TwoState) != CommandStyles.None) cmd.Checked = !cmd.Checked; ChartFX.WinForms.Internal.ICommandCollection iCommands = (ChartFX.WinForms.Internal.ICommandCollection)commands; // invoke the chart's internal handling of this item ChartFX.WinForms.Internal.CommandsEventArgs args = new ChartFX.WinForms.Internal.CommandsEventArgs( tag.m_chart, 0, tag.m_id, 0, tag.m_subId); iCommands.OnCommandEvent(args); Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.