Hi,
If the focus is on the ultraMonthViewMulti control and if the mouse is scrolled then months of the control scrolled, i want to stop this behaviour. Is there any property to do that?
Regards,
Abid
Hi Brian,
Can you post an example of how to call the protected override void OnMouseWheel( MouseEventArgs e) and tie it to the ultraMonthViewMulti control?
Cheers,Amy
Sorry, I missed that requirement the first time I read your post. I assume you want to prevent mouse wheel processing; you can do that by handling the MouseWheel event, upcasting the event args to type HandledMouseEventArgs, and setting the Handled property to true.
Thanks for your reply,
This has actually stopped the month scrolling by mouse but it has also stopped changing the months via buttons. My requirement is to stop that scrolling through mouse but if user clicks on the buttons at the control the months should get changed.
Any suggestions to extract such behaviour.
Thanks and Regards,
No, the control does not provide a way to prevent scrolling through the public object model. You can, however, hack this out by handling VisibleMonthsChanged and setting the FirstMonth property asynchronously therein.
Example:void mvm_VisibleMonthsChanged(object sender, EventArgs e){ this.BeginInvoke( new MethodInvoker(this.OnVisibleMonthsChangedAsync) );}
private void OnVisibleMonthsChangedAsync(){ this.mvm.FirstMonth = this.mvm.CalendarInfo.GetMonth( DateTime.Today );}