Hi.
How can I tell which button was clicked in the ChartDataClicked event handler?
I get a ChartDataEventArgs object but this doesnt seem to tell me which button was used. Is there any way to tell this?
I am using NetAdvantage 8.1
Tks
Dan
If you deffinitely need to handle ChartDataClick event, then what you can do is create a global variable, set it the the value that you obtained from ChartDataClicked event, and then use MouseDawn event to obtain button (left/right) such as:
ultraChart1.ChartDataClicked += new ChartDataClickedEventHandler(ultraChart1_ChartDataClicked); ultraChart1.MouseDown += new MouseEventHandler(ultraChart1_MouseDown);
private double dVal; private bool sw = false;
void ultraChart1_ChartDataClicked(object sender, ChartDataEventArgs e) { dVal = e.DataValue; sw = true; }
void ultraChart1_MouseDown(object sender, MouseEventArgs e) { if (sw) { MessageBox.Show(e.Button.ToString() + ", " + dVal.ToString()); } sw = false; }