Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


GTP.NET FAQ 10823


how to handle the mouseEnter and mouseLeave events for the time item? Please note that this article refers to the GTP.NET
Jump to article- 2007-02-27 19:11:00 - Email plexityHide

Question

How to handle the mouseEnter and mouseLeave events for the time item. Actually i want to change the color of timeitem when mouse entered and again apply the previous color when mouse leaves

Answer

Implement the event OnTimeItemAreaMouseMove. In this event look up the timeItem currently under the mouse with Gantt.TimeItemFromPoint.

Remember the result in a member variable, beware that the result might be null (mouse currently not over any time item) .

If the member variable with the time item changes value, then the old time item should get its default time item layout back: _oldRemeberedTimeItem.TimeItemLayout=DefaultTimeItemLayout, and the new value should be given a TimeItemLayout that represent "Mouse is over me".

It is not an uncommen mistake to change the TimeItemLayout's values, and thus changing the look for all time items with that time item layout. You should of course change the time items so that it points to a different time item layout to get the desired effect of only changing one time item.

 

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...