10110 : Is there a way to inhibit TimeItem Overlap.

Question

Is there a way to inhibit TimeItem Overlap. I want them to be placed side-by-side. In the onTimeCollision event how may I know wich is the Item being moved/resized and wich is the one who “suffer” the overlap?

Answer

To force time items to be placed side by side you simple turn on CollisionDetection (default on). As to how to find out who is the time item mostly suffering from a detected collision; This is really a business logic defintion, we simply cannot tell what makes most sense in all cases.

What you can do is to check the Currently selected time items, it is likely that you differ between the time item that has moved into a colliding position and the time item that has been “jumped”. Simply check the Selected flag on the time items in the oncollisiondetect event, the one selected is likely the one last moved.

Leave a Reply