10605 : AfterMove when no move

Question

At runtime, when I click on a timeitem, sometimes the event gSchedule_OnTimeItem_AfterMove will raise. It causes a bug to happen.

How to prevent this?

Answer

A click on a time item can be percieved as a very quick and very small move of the time item.
The best way to tell the Gantt that these “none moves” should be ignored is to assing some value to the Snapping parameters of the TimeItemLayout for that TimeItem. Snapping will round the values so that the moving is controlled by a snapping grid.

See SnapStartTime and SnapStopTime in the help file.

Leave a Reply