How to disable options of ChartController on run time?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Maverick123
Newbie
Newbie
Posts: 14
Joined: Wed Apr 06, 2011 12:00 am

How to disable options of ChartController on run time?

Post by Maverick123 » Wed Jun 29, 2011 9:18 am

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: How to disable options of ChartController on run time?

Post by Sandra » Thu Jun 30, 2011 1:14 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Maverick123
Newbie
Newbie
Posts: 14
Joined: Wed Apr 06, 2011 12:00 am

Re: How to disable options of ChartController on run time?

Post by Maverick123 » Fri Jul 01, 2011 6:48 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: How to disable options of ChartController on run time?

Post by Narcís » Fri Jul 01, 2011 10:04 am

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();
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Maverick123
Newbie
Newbie
Posts: 14
Joined: Wed Apr 06, 2011 12:00 am

Re: How to disable options of ChartController on run time?

Post by Maverick123 » Fri Jul 01, 2011 12:25 pm

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
Attachments
TeeChart.zip
Doc file explaining my problem.
(35.01 KiB) Downloaded 299 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: How to disable options of ChartController on run time?

Post by Narcís » Fri Jul 01, 2011 1:01 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply