Page 1 of 1

using Steema.TeeChart.Editors.AxisIncrement

Posted: Fri May 17, 2013 12:02 am
by 15664365
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?

Re: using Steema.TeeChart.Editors.AxisIncrement

Posted: Fri May 17, 2013 8:09 am
by narcis
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();
    }