Ok, in that case you should consider AutoScrollPosition.Y to get the ammount of scroll that has been applieed to the window as in the example below. Find attached complete form code of the working example.
Code: Select all
private void tchart1_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
Steema.TeeChart.TChart tmpChart = (Steema.TeeChart.TChart)sender;
Steema.TeeChart.Axis dragDropAxis;
int tmp = this.AutoScrollPosition.Y;
for (int i = 0; i < tmpChart.Axes.Custom.Count; i++)
{
dragDropAxis = tmpChart.Axes.Custom[i];
if (!dragDropAxis.Horizontal &&
((dragDropAxis.IStartPos + tmp <= e.Y) && (dragDropAxis.IEndPos + tmp >= e.Y)))
{
MessageBox.Show("Dropped on " + dragDropAxis.Title.Text);
break;
}
}
}