10969 : The OnTimeItemAreaMouseWheel is not being called at all when I scroll the wheel over the TimeItemArea?

Question

I am handling the OnTimeItemAreaMouseWheel event. However,  the handler is not being called at all when I scroll the wheel over the TimeItemArea. Do I have to do anything special to activate this event?

 

Answer

 

Some mouse events (the wheel events included) will not fire unless the control has keyboard focus.

 

We will look into a permanent solution but in the mean time add a Focus call in mouse down:

gantt1.OnTimeItemAreaMouseDown += new MouseEventHandler(gantt1_OnTimeItemAreaMouseDown);

void gantt1_OnTimeItemAreaMouseDown(object sender, MouseEventArgs e)
{
  gantt1.TimeItemArea.Focus();
}

 

Leave a Reply