Jump to content
Software FX Community

Statistic component & command ID


Joe

Recommended Posts

Posted

Hi,

I've to remove some tool buttons in the chart control.

The code snippet works fine for normal commands

SoftwareFX.ChartFX.

Command cmd = chart1.ToolBarObj.Commands[(int)SoftwareFX.ChartFX.CommandID.Gallery];

int index = 0;index = cmd.FindSubCommandID((int)SoftwareFX.ChartFX.CommandID.Candlestick);

if (index > -1) cmd.RemoveSubCommand(index);

It's plausible that there are no CommandIDs for 'statistical Studies' nor the statistical gallery types in ChartFX.CommandID, but

where can I find those IDs?

 

It seems that I not see the forest for the trees

 

best regards

 Joe

Posted

The commands added by the extensions (e.g. Statistical) are actually Dynamic as there may be more than one extension added.

What exactly are you trying to do with those? I may be able to give you some pointers on how to achieve it.

Posted

Hi Frank,

 I want to remove all statistic gallery types except 'BoxAndWhisker' also the 'statistic studies' button should be removed in the toolbar.

I figured out that e.g. 'Histogramm Chart' has an ID = 29954, but it is unstable to code it like this (because of upcoming changes). I would prefer a saver way, if ther is one.

 

best regards

 Joe

Posted

This is actually not as easy at it seems.

The problem is that these commands are added by the extension dynamically when it is attached to the chart. So even if you remove them they will be re-added when the extension re-attaches.

The extension re-ataches in many situations, one of the most common ones is during serialization. When you save the chart settings (either through the Export method or through personalization) the extensions get detached before saving and re-attached afterwords.

At this moment there is no API to tell the statistical extension not to add certain galleries or toolbar options so there is no reliable way or removing these options.

Posted

hmmm,

 not so fine ...,

but thats the answer I expectet after my tests :(

 

 Do you plan an update to solve the problem in future?

 

Posted

Not likely to make it in an update (SP) since it requires major changes. Definitely will not be done in 6.2 as there is a new version already available (7.0).

Possibly in a later version.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...