Page 1 of 1

TeeChart Editor form Title

Posted: Wed Sep 22, 2010 11:55 am
by 15048900
Is there a way to change the title on this form?

Thanks,

Matt

Re: TeeChart Editor form Title

Posted: Wed Sep 22, 2010 1:56 pm
by 10050769
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,

Re: TeeChart Editor form Title

Posted: Wed Sep 22, 2010 2:04 pm
by 15048900
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

Re: TeeChart Editor form Title

Posted: Wed Sep 22, 2010 3:17 pm
by 10050769
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,

Re: TeeChart Editor form Title

Posted: Wed Sep 22, 2010 3:26 pm
by 15048900
Yes, that worked nicely. Thanks.