TeeChart Editor form Title

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

TeeChart Editor form Title

Post by biqpaulson » Wed Sep 22, 2010 11:55 am

Is there a way to change the title on this form?

Thanks,

Matt

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

Re: TeeChart Editor form Title

Post by Sandra » Wed Sep 22, 2010 1:56 pm

Hello Matt,

Yes, you can change the Title of editor component as is done in next line of code:

Code: Select all

  editor1.Title = "MyChart";
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

biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

Re: TeeChart Editor form Title

Post by biqpaulson » Wed Sep 22, 2010 2:04 pm

Hi:

My code creates the editor this way:

CurrentTChart.ShowEditor()

The show editor function appears return a bool. So How do I get at the editor object to change the property?

The TeeChart control is called "CurrentTChart" and the Editor control is called: "TeeEditor1".

I tried this:

TeeEditor1.Title = "Edit chart"

But the title didn't change.

Does the "ShowEditor" method create a new editor that has nothing to do with the one on my form?

AH -- final note: I'm in vb.net, not C++.

Thanks,

Matt



Thanks,

Matt

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

Re: TeeChart Editor form Title

Post by Sandra » Wed Sep 22, 2010 3:17 pm

Hello Matt,

I made a simple example as create a editor, using Steema.TeeChart.Editor, and changing its title :

C#

Code: Select all

 public void InitializeChart()
        {
            string Title = "My Chart Editor";
            ShowEditor(tChart1, Title);
        }
        private void ShowEditor(Steema.TeeChart.TChart tChart1, String Title)
        {
            Steema.TeeChart.Editor editor1 = new Steema.TeeChart.Editor();
            this.Controls.Add(editor1);
            editor1.Chart = tChart1;
            editor1.Title = Title;
            editor1.ShowModal();
        }

VB

Code: Select all

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Title As String
        Title = "My new Editor"
        ShowEditor(TChart1, Title)
    End Sub
    Private Sub ShowEditor(ByVal TChart As Steema.TeeChart.TChart, ByVal Title As String)
        Dim editor1 As Steema.TeeChart.Editor
        editor1 = New Steema.TeeChart.Editor()
        Me.Controls.Add(editor1)
        editor1.Chart = TChart1
        editor1.Title = Title
        editor1.ShowModal()
    End Sub
Could you tell us if previous code works as you want?

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

biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

Re: TeeChart Editor form Title

Post by biqpaulson » Wed Sep 22, 2010 3:26 pm

Yes, that worked nicely. Thanks.

Post Reply