Hi Steema Support,
Is it possible to show message box on clicking on the portion (downside of axis) of the axis. As shown in attached image.
please provide any solution for the same, it is very helpful to us.
Thanks in advance.
Thanks&Regards
PlanoResearch
To show message on clicking downside to axis
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: To show message on clicking downside to axis
Hello,
Try:
Try:
Code: Select all
private void InitializeChart()
{
tChart1.MouseDown += tChart1_MouseDown;
tChart1.Series.Add(typeof(Bar)).FillSampleValues();
tChart1.AfterDraw += tChart1_AfterDraw;
tChart1.Axes.Bottom.Title.Text = "bottom axes";
}
Rectangle rect;
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
rect = Utils.FromLTRB(tChart1.Axes.Bottom.IStartPos, tChart1.Axes.Left.IEndPos, tChart1.Axes.Bottom.IEndPos,
tChart1.Axes.Bottom.Position + tChart1.Axes.Bottom.Labels.Height + tChart1.Axes.Bottom.Ticks.Length);
g.Pen.Color = Color.Red;
g.Brush.Visible = false;
g.Rectangle(rect);
}
void tChart1_MouseDown(object sender, MouseEventArgs e)
{
tChart1.Chart.CancelMouse = true;
if (tChart1.Axes.Bottom.Title.Clicked(e.X, e.Y))
{
MessageBox.Show("Title Clicked");
}
if(rect.Contains(e.X, e.Y))
{
MessageBox.Show("Axis Clicked");
}
}
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 |