Teechart Editor CloseEditor Event not recognized

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Sharkann
Newbie
Newbie
Posts: 17
Joined: Fri Apr 22, 2022 12:00 am

Teechart Editor CloseEditor Event not recognized

Post by Sharkann » Tue Aug 30, 2022 7:22 am

Hi,

I have a Teechart (Tchart1) on a form, and I added a "setup" button for the user to open the editor and allow him to change the Chart properties. I have drag-dropped a "Tchart Editor" on my form called 'Editor1'. That is working fine :

Code: Select all

Private Sub setup_btn_click(sender As Object, e As EventArgs) Handles setup_btn.Click
        Editor1.Show(TChart1)
    End Sub
Problem : when the user clicks "Close" in the editor after the changes, I want to go in a sub to do things about curves colors it they have changed. But the event CloseEditor is not recognized :

Code: Select all

Private Sub exit_setup(sender As Object, e As EventArgs) Handles Editor1.CloseEditor
        Stop
    End Sub
And I can never go in that sub...
Any idea ?

Thanks
Sharkann

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Teechart Editor CloseEditor Event not recognized

Post by Christopher » Wed Aug 31, 2022 9:12 am

Hello,

I think it should work with ShowModal, e.g.

Code: Select all

    public Form1()
    {
      InitializeComponent();

      editor1.Chart = tChart1;
      editor1.CloseEditor += Editor1_CloseEditor;
    }

    private void Editor1_CloseEditor(object sender, EventArgs e)
    {
      MessageBox.Show("Editor Closed");
    }

    private void button1_Click(object sender, EventArgs e)
    {
      editor1.ShowModal();
    }
  }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Sharkann
Newbie
Newbie
Posts: 17
Joined: Fri Apr 22, 2022 12:00 am

Re: Teechart Editor CloseEditor Event not recognized

Post by Sharkann » Thu Sep 01, 2022 5:24 am

Hi,

Thanks for the answer.
I found another way to do it, i guess it is something linked to modal also :

Code: Select all

        Dim res As DialogResult = Editor1.Show(TChart1)
        If (res = DialogResult.OK) Then...
        
Anyway, thanks !!

Sharkann

Post Reply