Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


GTP.NET FAQ 11019


OnTimeItem_AfterMove event, the TimeItemEventArgs returns 0 in its X and Y fields? Please note that this article refers to the GTP.NET
Jump to article- 2007-10-20 10:09:00 - Email plexityHide

Question

 

I am trying cause an interaction between two objects (represented by timeitems in the Gantt) that is triggered when one timeitem is moved on top of another. When trying to implement this by using the OnTimeItem_AfterMove event, the TimeItemEventArgs returns 0 in its X and Y fields. This is not good, since I am trying to find the "lower" timeitem by using the Gantt.TimeItemFromPoint method.

1) Why does the TimeItemEventArgs return these values?

2) If this is not fixable, how do I find the relevant timeitem?

 

Answer

 

1) The mouse position is not relevant after the mouse button is released, and the draw rectangle of the time item is not updated until the next render-sweep, what is valid here is the Start and Stop of the time item (collisiondetection may affect Y pixel pos, datescaler changes my change X pixel pos)

 

2) In the AfterMove the Start and Stop is updated. You can use those along with the DateScaler.TimeToPixel to get the X position and from that look for the time item that is on that position with TimeItemFromPoint.

 

 

Google
WWW plexityHide GTP.NET FAQ
Support

Support intro

Knowledgebase

FAQ phGantTimePackage

FAQ GTP.NET

FAQ general

Testimonials

"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%"
Gaurav Patole,
WebTechDevelopers
More testimonials...