Page 1 of 1

Gantt-Chart: how to access object with right mouse button ?

Posted: Mon Jun 25, 2007 2:34 pm
by 9644075
I am using a gantt-chart with 8 objects.

If the user is over one object and presses the left-mouse button,
I want show DETAIL-Informations for this object.

How can I get the information, about the current object ( Gantt-object 1-9 ) under the mouse.

I must know, which object it is 1, or 2 or 3...

Tahnks for any help
in advance

Peter

Posted: Tue Jun 26, 2007 8:08 am
by 9348258
Hi Peter

You should to use the "tChart_ClickSeries" event as below code:

Code: Select all

private void tChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left && s is Steema.TeeChart.Styles.Gantt)
            {
                tChart1.Text = "Left button on the Gantt Series, number: " + valueIndex.ToString();
                //here your code.
            }
            else
                tChart1.Text = "";
        }