Jump to content
Software FX Community

Toolbar buttons customization


abcd_1234_
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...