using Steema.TeeChart.Editors.AxisIncrement

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Adrian
Newbie
Newbie
Posts: 5
Joined: Tue Dec 11, 2012 12:00 am

using Steema.TeeChart.Editors.AxisIncrement

Post by Adrian » Fri May 17, 2013 12:02 am

I'd like to be able to call the AxisIncrement dialog to allow my users to edit the increment but I can find how to do this. Is it possible to pass an axis object to this dialog?

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

Re: using Steema.TeeChart.Editors.AxisIncrement

Post by Narcís » Fri May 17, 2013 8:09 am

Hi Adrian,

This is not possible. In theory you should use the editor doing something similar as the code snippet shown below but it doesn't work as AxisIncrement.Increment property is read-only. So the only solution is creating your own editor.

Code: Select all

    private void button1_Click(object sender, EventArgs e)
    {
      Steema.TeeChart.Editors.AxisIncrement a = new Steema.TeeChart.Editors.AxisIncrement();
      Steema.TeeChart.Axis axis = tChart1.Axes.Bottom;

      a.Text = string.Format(Texts.DesiredIncrement, axis.TitleOrName());
      a.Increment = axis.Increment;

      if (a.ShowDialog(this) == DialogResult.OK)
      {
        axis.Increment = a.Increment;
        axis.Invalidate();
      }

      a.Dispose();
    }
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