abcd_1234_ Posted April 11, 2007 Report Share Posted April 11, 2007 Hi there, We're trying to customize what buttons are displayed on the toolbar using code that looks like this: m_chart.ToolBar.Clear(); ToolBarItem command1 = new ToolBarItem(CommandId.PrintDialog); m_chart.ToolBar.Insert(0, command1); ToolBarItem command4 = new ToolBarItem(CommandId.Zoom); m_chart.ToolBar.Insert(3, command4); m_chart.ToolBar.Insert(3, command4); When user clicks on any of the above buttons, we are seeing a "Statistics" button showing up at the end of the toolbar!! Previously we added an SPC study to the chart using the below code, but never wanted to display a button in the toolbar. So how can we make sure that the Statistics button does not show up when users click other buttons. m_statistics.Studies.Add(StudyGroup.Spc); Thanks for any info Tejo ToolBarItem command4 = new ToolBarItem(CommandId.Zoom); m_chart.ToolBar.Insert(3, command4); m_chart.ToolBar.Insert(3, command4); When user clicks on any of the above buttons, we are seeing a "Statistics" button showing up at the end of the toolbar!! Previously we added an SPC study to the chart using the below code, but never wanted to display a button in the toolbar. So how can we make sure that the Statistics button does not show up when users click other buttons. m_statistics.Studies.Add(StudyGroup.Spc); Thanks for any info Tejo ToolBarItem command1 = new ToolBarItem(CommandId.PrintDialog); m_chart.ToolBar.Insert(0, command1); ToolBarItem command4 = new ToolBarItem(CommandId.Zoom); m_chart.ToolBar.Insert(3, command4); m_chart.ToolBar.Insert(3, command4); When user clicks on any of the above buttons, we are seeing a "Statistics" button showing up at the end of the toolbar!! Previously we added an SPC study to the chart using the below code, but never wanted to display a button in the toolbar. So how can we make sure that the Statistics button does not show up when users click other buttons. m_statistics.Studies.Add(StudyGroup.Spc); Thanks for any info Tejo ToolBarItem command4 = new ToolBarItem(CommandId.Zoom); m_chart.ToolBar.Insert(3, command4); m_chart.ToolBar.Insert(3, command4); When user clicks on any of the above buttons, we are seeing a "Statistics" button showing up at the end of the toolbar!! Previously we added an SPC study to the chart using the below code, but never wanted to display a button in the toolbar. So how can we make sure that the Statistics button does not show up when users click other buttons. m_statistics.Studies.Add(StudyGroup.Spc); Thanks for any info Tejo Quote Link to comment Share on other sites More sharing options...
abcd_1234_ Posted April 11, 2007 Author Report Share Posted April 11, 2007 I don't know why the message displayed thrice.. it got worse when I tried to edit the message.. so pls read the first one and ignore the repeats.. Thanks Quote Link to comment Share on other sites More sharing options...
Frank Posted April 11, 2007 Report Share Posted April 11, 2007 The statistical legend button is automatically added by the Statistical extension. This button is not part of the Chart FX toolbar and therefore you can no remove it. The only thing you can do is to intercept the Internal Command for that button and do nothing when this command is executed. At this time there is no way to control the visibility of this button added by the extension. Quote Link to comment Share on other sites More sharing options...
abcd_1234_ Posted April 16, 2007 Author Report Share Posted April 16, 2007 Thanks for the info Frank. Will get the command and try doing nothing or display a message when the button gets clicked. Have a nice day Tejo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.