Can I Set the Title on Export Dialog?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Dave
Advanced
Posts: 139
Joined: Mon Sep 22, 2008 12:00 am

Can I Set the Title on Export Dialog?

Post by Dave » Wed Apr 29, 2009 7:59 am

Hello Support

Im using the ShowExportDialog() function to let the user save a chart.
However Id like to have the chart name shown in the Title bar of the TeeChart Export Dialog box. Can I do this?

cheers

Dave
Advanced
Posts: 139
Joined: Mon Sep 22, 2008 12:00 am

Post by Dave » Wed Apr 29, 2009 8:22 am

Sorry guys please ignore that question. I worked it out myself after a few seconds thought. ie.

Steema.TeeChart.Editor editor1 = new Steema.TeeChart.Editor(theController.Chart);
editor1.Title = "My Chart";
editor1.ShowModal();

Dave
Advanced
Posts: 139
Joined: Mon Sep 22, 2008 12:00 am

Post by Dave » Wed Apr 29, 2009 8:31 am

Actually the above displays the Editor dialog. Im not sure how I display the Export Dialog in a way that lets me change the title.

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

Post by Sandra » Wed Apr 29, 2009 9:44 am

Hello Dave,


I find two solutions for your problem, I recomend that check the following codes and comprove that works fine.


First example:

You could use a button for open the Editor using ShowEditorDialog:

Code: Select all

        private void button1_Click(object sender, EventArgs e)
        {
            Steema.TeeChart.Editors.Export.ExportEditor expEditor1 = new Steema.TeeChart.Editors.Export.ExportEditor(tChart1.Chart, null);
            expEditor1.Text = "my export editor";
            expEditor1.ShowDialog();
           
        }
Second example:

You could use tChart1.Draw() before the shows Editor for example:

Code: Select all

        public void InitializeChart()
        {
            Steema.TeeChart.Styles.Line l = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            tChart1.Aspect.View3D = false;
            tChart1[0].FillSampleValues();
            tChart1.Draw();
            Steema.TeeChart.Editors.Export.ExportEditor expEditor1 = new Steema.TeeChart.Editors.Export.ExportEditor(tChart1.Chart, null);
            expEditor1.Text = "my export editor";
            expEditor1.ShowDialog();

        }
Thanks,

I hope that helps.
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

Dave
Advanced
Posts: 139
Joined: Mon Sep 22, 2008 12:00 am

Post by Dave » Wed Apr 29, 2009 10:31 am

Thanks Sandra your first solution works perfectly.

Post Reply