10341 : Controlling datetime values while they change


Is it possible when resizing an item (not after releasing the mouse button) snap the start of every item to the 0.00.00 time of that day and the resizing the end to the 23.59.59 ?


If you implement the OnTimeItem_Hoover event and access the e.Diff property you will find how much the move is currently worth. So if the mouse button is released the new value on whatever is changed will be oldValue.Add(e.Diff).

What you can do is to change the e.Diff value in OnTimeItem_Hoover event. You can change the value anyway you like but if you want snapping you can use the Gantt.DateScaler.Snap function.

Leave a Reply