Page 1 of 1
How to disable options of ChartController on run time?
Posted: Wed Jun 29, 2011 9:18 am
by 15659004
Hi,
I am switching from TeeChart Pro v7.0.0.7 to TeeChart .Net Pro v.4.0.2011.2082. I want to disable some options provided by “ChartController”. e.g. “Add”, “Delete”, “Title”, “Clone” and “Change” buttons for series tab on run time (through code). In TeeChart7 I was doing the same by using Editor using following code
TeeCommander1.EditorLink = TeeEditor1.EditorLink
TeeEditor1.Options.Add = False
How I can perform same functionality in TeeChart for .Net 2010?
Thanks and Regards,
Immi
Re: How to disable options of ChartController on run time?
Posted: Thu Jun 30, 2011 1:14 pm
by 10050769
Hello Maverick123,
I recommend you, take a look in demo project, concretely in All Features\Welcome!\Components\ChartController\ChartController Editor where you can see how you can customizing your ChartController.
I hope will helps.
Thanks,
Re: How to disable options of ChartController on run time?
Posted: Fri Jul 01, 2011 6:48 am
by 15659004
Sandra,
Thanks for reply,
In Demo project i got the way to hide whole tab(s). Even if i can hide buttons through "ChartEditorOptions" it will not solve my problem because i want to Disable buttons (not hide) as were done in TeeChart7.
I am repeating my question: How can I disable “Add”, “Delete”, “Title” etc buttons on series tab of ChartController in TeeChart for .Net 2010? I will appreciate of you can provide me a sample code for this.
Regards,
Maverick
Re: How to disable options of ChartController on run time?
Posted: Fri Jul 01, 2011 10:04 am
by narcis
Hi Maverick,
You need to do as Yeray explained
here. So that in your case would be:
Code: Select all
Steema.TeeChart.Editor editor = new Steema.TeeChart.Editor(tChart1);
Steema.TeeChart.Editors.ChartEditorOptions[] options = new Steema.TeeChart.Editors.ChartEditorOptions[2] {
Steema.TeeChart.Editors.ChartEditorOptions.Clone,
Steema.TeeChart.Editors.ChartEditorOptions.Change };
editor.Options = options;
editor.ShowModal();
Re: How to disable options of ChartController on run time?
Posted: Fri Jul 01, 2011 12:25 pm
by 15659004
Hello Narcis,
Thanks a lot for your reply,
I think you are not getting my point although i tried to explain clearly in my last reply. i.e.
Even if i can hide buttons through "ChartEditorOptions" it will not solve my problem because i want to Disable buttons (not hide) as were done in TeeChart7.
The code you provided is
hiding the buttons/options not
disabling.
In order to explain more clearly i am attaching a document having print shots of, what i am looking for and what sample code is doing.
Hope it works,
I have another question. In TeeChart7 i copied the graph into clipboard by using following code
TChart1.Export.CopyToClipboardMetafile(True)
What is the alternate of "CopyToClipboardMetafile" in .Net version of TeeChart. OR How i can achieve the previous functionlaity in through .Net version of TeeChart.
Hope you will not mind my 2nd question in reply of the first one
Regards,
Maverick
Re: How to disable options of ChartController on run time?
Posted: Fri Jul 01, 2011 1:01 pm
by narcis
Hi Maverick,
The code you provided is hiding the buttons/options not disabling.
Sorry, I see what you mean now. I'm afraid this is not possible, only toggling them is possible for now. I'll add your request to the wish-list to be considered for inclusion in future releases (TF02015635).
What is the alternate of "CopyToClipboardMetafile" in .Net version of TeeChart. OR How i can achieve the previous functionlaity in through .Net version of TeeChart.
There's an example of this at
All Features\Welcome !\Exporting\Chart Picture\Metafile example in the features demo available at TeeChart's program group.