10192 : DateTime from a point on the TimeItemArea which is selected by the mouse ptr?

Question

I would like to get the DateTime from a point on the TimeItemArea which is selected by the mouse ptr. Therefore I implemented the OnTimeItemAreaMouseDown method but how do I get the DateTime from e.X and e.Y?

Answer

You use the Gantt.DateScaler.PixelToTime(int pix) method… If you have a datetime and need the a pixel there is a Gantt.DateScaler.TimeToPixel

Leave a Reply